Skip to content

Commit

Permalink
address more feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ssayer committed Aug 9, 2021
1 parent 9242380 commit 60b63a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

`rqrcode_core` is a library for encoding QR Codes in pure Ruby. It has a simple interface with all the standard qrcode options. It was originally adapted in 2008 from a Javascript library by [Kazuhiko Arase](https://github.com/kazuhikoarase).

Features:q
Features:

* `rqrcode_core` is a Ruby only library. It requires no native libraries. Just Ruby!
* It is an encoding library. You can't decode QR Codes with it.
Expand Down
4 changes: 1 addition & 3 deletions lib/rqrcode_core/qrcode/qr_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def initialize(data, *args)
end
@error_correct_level = QRERRORCORRECTLEVEL[level]

if !QRERRORCORRECTLEVEL.has_key?(level)
unless @error_correct_level
raise QRCodeArgumentError, "Unknown error correction level `#{level.inspect}`"
end

Expand Down Expand Up @@ -406,8 +406,6 @@ def map_data(data, mask_pattern) #:nodoc:
def minimum_version(limit: QRUtil.max_size, version: 1)
raise QRCodeRunTimeError, "Data length exceed maximum capacity of version #{limit}" if version > limit

# rs_blocks = QRRSBlock.get_rs_blocks(version, QRERRORCORRECTLEVEL[error_correction_level])
# max_size_bits = QRCode.count_max_data_bits(rs_blocks)
max_size_bits = QRMAXBITS[error_correction_level][version - 1]

size_bits = multi_segment? ? @data.sum { |seg| seg.size(version) } : @data.size(version)
Expand Down

0 comments on commit 60b63a5

Please sign in to comment.