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

super fails to find superclass method from module prepended to singleton class #2980

Closed
kstuart opened this issue May 24, 2015 · 1 comment
Closed

Comments

@kstuart
Copy link

kstuart commented May 24, 2015

The following works in MRI and Rubinius but fails in jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-05-23 57edf61 Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64]

class Wibble
  def say_it
    puts 'wibble'
  end
end

module Wabble
  def say_it
    puts 'wabble'
    super
  end
end

wibble = Wibble.new

wibble.singleton_class.prepend(Wabble)
wibble.say_it

with output:

wabble
NoMethodError: super: no superclass method `say_it'
  say_it at test.rb:10
   <top> at test.rb:17
@kstuart
Copy link
Author

kstuart commented Aug 21, 2015

closing as appears to be working on JRuby 9.0.0.0

@kstuart kstuart closed this as completed Aug 21, 2015
@enebo enebo added this to the JRuby 9.0.0.0 milestone Sep 2, 2015
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