Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
RubyArray#flatten! uses `respond_to?` unlike the original [lotus] #2563
Noticed while running through
On a fairly recent master master (updated an hour ago or so) the following behaviour is observable:
jruby-head :003 > [BasicObject.new].flatten! NoMethodError: undefined method `respond_to?' for #<BasicObject:0x7c24d3f1> from org/jruby/RubyArray.java:2841:in `flatten!' from (irb):3:in `evaluate' from org/jruby/RubyKernel.java:1000:in `eval' from org/jruby/RubyKernel.java:1310:in `loop' from org/jruby/RubyKernel.java:1120:in `catch' from org/jruby/RubyKernel.java:1120:in `catch' from /home/tobi/.rvm/rubies/jruby-head/bin/irb:13:in `__script__'
2.2.0 :006 > [BasicObject.new].flatten! => nil
This makes a spec in lotus/controller fail.
This seems reasonably easy to fix - time is scarce as always but I'd love to give this a shot this weekend (will hopefully get to it) - but I gotta setup the whole JRuby project first, we'll see :) However, anyone - don't let that stop you! :)
On a larger scale, though - it seems like almost nothing should use
referenced this issue
Feb 5, 2015
The problem lies in Lotus::Kernel.Array.
@headius you can isolate it via this test: