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

Clone proc blocks as well so they have their own frame etc. #5214

merged 1 commit into from Jun 12, 2018


Copy link

@headius headius commented Jun 11, 2018

Fixes #2212.

@headius headius added this to the JRuby milestone Jun 11, 2018
Copy link
Member Author

@headius headius commented Jun 11, 2018

This also needs specs. The example case from #2212 also fails to super properly without this patch:

class A
  def a
    p :a

PROC = proc {p :proc; super}

class B < A
  define_method(:a, PROC)
  define_method(:b, PROC)

Which produces the following error (without my fix):

$ jruby blah2.rb 
NoMethodError: super: no superclass method `b' for #<B:0x27f723>
  block in blah2.rb at blah2.rb:7
             <main> at blah2.rb:14

@headius headius force-pushed the clone_proc_for_define branch from 658bae1 to f03fc20 Jun 11, 2018
@headius headius added the core label Jun 12, 2018
@headius headius merged commit 13130e2 into jruby:master Jun 12, 2018
1 check failed
@headius headius deleted the clone_proc_for_define branch Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant