-
-
Notifications
You must be signed in to change notification settings - Fork 943
Closed
Milestone
Description
This issue is affecting I18n::Cascade, see ruby-i18n/i18n#156
I reproduced the issue on irb:
[:something, :wrong].slice(-1, 1).join(".")
# TypeError: can't convert Symbol into String
# from org/jruby/RubyArray.java:1871:in `join'
# from (irb):2:in `evaluate'
# from org/jruby/RubyKernel.java:1088:in `eval'
# from org/jruby/RubyKernel.java:1410:in `loop'
# from org/jruby/RubyKernel.java:1197:in `catch'
# from org/jruby/RubyKernel.java:1197:in `catch'
[:something, :wrong].slice(-1, 1)
#=> [:wrong]
[:wrong].join(".")
#=> "wrong"Calling Array#join on an Array#slice result, throws the exception.
Using a variable, I get the same issue:
data = [:something, :wrong].slice(-1, 1)
#=> [:wrong]
data.join(".")
# TypeError: can't convert Symbol into String
# from org/jruby/RubyArray.java:1871:in `join'
# from (irb):7:in `evaluate'
# from org/jruby/RubyKernel.java:1088:in `eval'
# from org/jruby/RubyKernel.java:1410:in `loop'
# from org/jruby/RubyKernel.java:1197:in `catch'
# from org/jruby/RubyKernel.java:1197:in `catch'I'm not sure but seems like something related to slice result.
Anyway, comparing the slice result with plain array, I get true:
[:something, :wrong].slice(-1, 1) == [:wrong]
#=> trueI don't know the jruby core but I will look tomorrow :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels