Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block in class << self in a def does not execute when JIT'd #2364

Open
enebo opened this issue Dec 29, 2014 · 1 comment
Open

block in class << self in a def does not execute when JIT'd #2364

enebo opened this issue Dec 29, 2014 · 1 comment

Comments

@enebo
Copy link
Member

@enebo enebo commented Dec 29, 2014

Originally from JRUBY-4963 (works in both 1.7 and 9000 interpreters):

def hello
  class << self
    yield
  end
end

p(hello { 123 })
@jvbreen1
Copy link

@jvbreen1 jvbreen1 commented Feb 24, 2016

This is my first time commenting on a JRuby issue, so please let me know if I understand correctly. You're expecting the error from http://comments.gmane.org/gmane.comp.lang.jruby.devel/8456 to occur when I execute the code above in JIT mode?

If so, I'm not seeing that error:

➜  ~  cat test.rb
def hello
  class << self
    yield
  end
end

p(hello { 123 })
➜  ~  jruby test.rb
123
➜  ~  jruby -v
jruby 9.0.3.0 (2.2.2) 2015-10-21 633c9aa Java HotSpot(TM) 64-Bit Server VM 25.60-b23 on 1.8.0_60-b27 +jit [darwin-x86_64]
➜  ~  Work/jruby/bin/jruby -v
jruby 9.1.0.0-SNAPSHOT (2.2.3) 2016-02-24 9fc6fb1 Java HotSpot(TM) 64-Bit Server VM 25.60-b23 on 1.8.0_60-b27 +jit [darwin-x86_64]
➜  ~  Work/jruby/bin/jruby test.rb
123

Is there a specific environment here? I see the original issue is quite old. I'm running on a MacBook Pro with OS X Mavericks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants