Skip to content

Commit

Permalink
Updated standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasfroehner committed Jul 8, 2024
1 parent fcaef95 commit ac9e445
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/zint/barcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def encoded_data_raw_ffi
# @return [Array<String>] encoded data
def encoded_data_as_array_of_strings
rows.times.map do |row|
binstr = @zint_symbol[:encoded_data].to_ptr.get_bytes(144 * row, (width+7) / 8)
binstr = @zint_symbol[:encoded_data].to_ptr.get_bytes(144 * row, (width + 7) / 8)
binstr.unpack1("b*")[0, width]
end
end
Expand Down
20 changes: 10 additions & 10 deletions spec/zint/data_matrix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ module Zint

it "provides encoded_data" do
enc = Zint::DataMatrix.new(value: "12345").encode.encoded_data_as_array_of_strings
expect(enc).to eq( ["1010101010",
"1101100111",
"1100010110",
"1100110101",
"1100111000",
"1000011111",
"1101011110",
"1110000111",
"1101100100",
"1111111111"])
expect(enc).to eq(["1010101010",
"1101100111",
"1100010110",
"1100110101",
"1100111000",
"1000011111",
"1101011110",
"1110000111",
"1101100100",
"1111111111"])
end

describe "export" do
Expand Down

0 comments on commit ac9e445

Please sign in to comment.