Repository navigation
Meet error ArgumentError: wrong number of arguments calling gsub (0 for 1) when upgrade to v1.2.6 #114
Copy link
Copy link
Closed
Description
Hi,
I met a problem when upgraded from 1.2.5 -> 1.2.6. It runs fine with 1.2.5.
It throws ArgumentError: wrong number of arguments callinggsub (0 for 1) at this line
https://github.com/tzinfo/tzinfo/blob/v1.2.6/lib/tzinfo/ruby_data_source.rb#L41
It is quite weird to me...
Could you please help to check?
The code
DEFAULT_LOCAL = ActiveSupport::TimeZone["America/Chicago"].today
Log
load_timezone_info at /Users/hieu/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/tzinfo-1.2.6/lib/tzinfo/ruby_data_source.rb:43
get at /Users/hieu/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/tzinfo-1.2.6/lib/tzinfo/timezone.rb:92
new at /Users/hieu/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/tzinfo-1.2.6/lib/tzinfo/timezone.rb:113
find_tzinfo at /Users/hieu/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/activesupport-5.2.4.1/lib/active_support/values/time_zone.rb:206
initialize at /Users/hieu/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/activesupport-5.2.4.1/lib/active_support/values/time_zone.rb:300
[] at /Users/hieu/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/activesupport-5.2.4.1/lib/active_support/values/time_zone.rb:234
<class:RangeGeneratorTest> at /Users/hieu/TD/Plugins/embulk-input-mixpanel/test/test_range_generator.rb:9
gem file lock:
PATH
remote: .
specs:
embulk-input-mixpanel (0.5.15)
activesupport
httpclient (>= 2.8.3)
perfect_retry (~> 0.5)
tzinfo (= 1.2.6)
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.2)
concurrent-ruby (1.1.5)
docile (1.3.2)
embulk (0.8.39-java)
bundler (>= 1.10.6)
liquid (~> 4.0.0)
msgpack (~> 1.1.0)
rjack-icu (~> 4.54.1.1)
everyleaf-embulk_helper (0.0.6)
ffi (1.12.2-java)
httpclient (2.8.3)
i18n (1.5.1)
concurrent-ruby (~> 1.0)
json (2.3.0-java)
liquid (4.0.3)
method_source (0.9.2)
minitest (5.14.0)
msgpack (1.1.0-java)
perfect_retry (0.5.0)
power_assert (1.1.5)
pry (0.12.2-java)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
spoon (~> 0.0)
rake (13.0.1)
rjack-icu (4.54.1.1-java)
rr (1.2.1)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
spoon (0.0.6)
ffi
test-unit (3.3.5)
power_assert
test-unit-rr (1.0.5)
rr (>= 1.1.1)
test-unit (>= 2.5.2)
thread_safe (0.3.6-java)
tzinfo (1.2.6)
thread_safe (~> 0.1)
PLATFORMS
java
DEPENDENCIES
bundler (~> 1.0)
codeclimate-test-reporter (~> 0.5)
embulk (>= 0.8.6, < 1.0)
embulk-input-mixpanel!
everyleaf-embulk_helper
pry
rake (>= 10.0)
test-unit
test-unit-rr
BUNDLED WITH
1.17.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
philr commentedon Feb 6, 2020
It looks like this is a bug with JRuby 9.0.5.0. The conditional
usingon line 2 causes thegsubcall to fail (even thoughUntaintExtisn't defined).Later versions of JRuby work fine and, according to the JRuby roadmap, version 9.0 is now 'defunct'. I'd therefore suggest upgrading if you can.
Alternatively, as a work around, you can just remove the
usingcalls from line 2 of ruby_data_source.rb and line 2 zoneinfo_timezone_info.rb and everything should work fine.I'll try and include a fix in a future 1.2.7 release.
hieudion commentedon Feb 7, 2020
Thanks a lot!!!
Your workaround works perfectly.
Going to close that issue.
Fix erroneous 'wrong number of arguments' errors on JRuby 9.0.5.0.
Fix erroneous 'wrong number of arguments' errors on JRuby 9.0.5.0.
Eliminate Object#untaint deprecation warnings when running on JRuby 9.4.
Eliminate Object#untaint deprecation warnings on JRuby 9.4.0.0.
Eliminate Object#untaint deprecation warnings on JRuby 9.4.0.0.
Eliminate Object#untaint deprecation warnings on JRuby 9.4.0.0.