You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
%: ruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.91-b01 on 1.7.0_91-mockbuild_2015_11_20_16_53-b00 +jit [linux-amd64]
%: uname -a
Linux centos7andy.jhallpr.com 3.10.0-327.4.4.el7.x86_64 #1 SMP Tue Jan 5 16:07:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Example code appears to trigger the behaviour in plain jRuby without any gems being required.
Expected Behavior
I should get the same behaviour in MRI and jRuby -- the example program should not raise ArgumentError.
Example program:
module RubyPatches
refine String do
def does_nothing; self; end
end
end
module Ffile
extend self
using RubyPatches # comment out this line to make the ArgumentError go away
def fall_over
proc {|a| a }
end
end
Ffile.fall_over
Actual Behavior
ArgumentError: tried to create Proc object without a block
proc at org/jruby/RubyKernel.java:1275
fall_over at ffile3.rb:16
<top> at ffile3.rb:23
The text was updated successfully, but these errors were encountered:
Environment
Example code appears to trigger the behaviour in plain jRuby without any gems being required.
Expected Behavior
I should get the same behaviour in MRI and jRuby -- the example program should not raise ArgumentError.
Example program:
Actual Behavior
The text was updated successfully, but these errors were encountered: