From a752d1be20b0af6de4a71f3494912b989741cfb0 Mon Sep 17 00:00:00 2001 From: Epigene Date: Tue, 19 Jun 2018 09:43:54 +0300 Subject: [PATCH] Fixed non-string handling --- Gemfile.lock | 2 +- lib/seb_elink/gateway.rb | 2 +- lib/seb_elink/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1b857be..4c4cf11 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - seb_elink (1.0.1.pre.beta1) + seb_elink (1.0.1.pre.beta2) GEM remote: https://rubygems.org/ diff --git a/lib/seb_elink/gateway.rb b/lib/seb_elink/gateway.rb index d0423ca..06c9c06 100644 --- a/lib/seb_elink/gateway.rb +++ b/lib/seb_elink/gateway.rb @@ -37,7 +37,7 @@ def produce_footprint(options) # 2. build the 'len(p1)||p1..' string # This here is weak. Handling accented unicode is one, but chinese characters will break thos logic - length = data_hash[field].size.to_s.rjust(3, "0") + length = data_hash[field].to_s.size.to_s.rjust(3, "0") "#{length}#{data_hash[field]}" end.join("") diff --git a/lib/seb_elink/version.rb b/lib/seb_elink/version.rb index eb76131..1509036 100644 --- a/lib/seb_elink/version.rb +++ b/lib/seb_elink/version.rb @@ -1,3 +1,3 @@ module SebElink - VERSION = "1.0.1-beta1" + VERSION = "1.0.1-beta2" end