Issue Type: Bug Bug
Affects Versions: JRuby 1.6.7
Assignee: Thomas E Enebo
Created: 08/Jul/12 1:36 AM
Description:

If I do the following:

def my_method(a)
  puts a.inspect
end

m = method(:my_method)

p = Proc.new {|a| puts a.inspect}

begin
  arr_of_arrs = [[1]]
  arr_of_arrs.each(&m)
  arr_of_arrs.each(&p)

  m.call(arr_of_arrs.first)
  p.call(arr_of_arrs.first)
end

I find that I get different results under JRuby --1.9 and YARV Ruby 1.9.3

YARV Ruby 1.9.3 is all consistent:

[1]
[1]
[1]
[1]
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]

JRuby --1.9 has different behavior for a method object:

$ jruby --1.9 -S irb
<snip code>
1
[1]
[1]
[1]

$ jruby --1.9 --version
jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-05-01 26e08ba) (Java HotSpot(TM)
64-Bit Server VM 1.7.0_04) [darwin-x86_64-java]
Project: JRuby
Labels: jruby
Priority: Major Major
Reporter: Andrew Grimm
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to