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

NoMethodError: undefined method `refine' for M:Module #4474

Closed
najamelan opened this issue Feb 4, 2017 · 2 comments
Closed

NoMethodError: undefined method `refine' for M:Module #4474

najamelan opened this issue Feb 4, 2017 · 2 comments
Milestone

Comments

@najamelan
Copy link

najamelan commented Feb 4, 2017

Environment

jruby -v : jruby 1.7.26 (2.0.0p598) 2016-11-12 fffffff on OpenJDK 64-Bit Server VM 1.8.0_121-8u121-b13-2-b13 +jit [linux-amd64]
uname -a: Linux computer 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux

installed jruby from debian/testing with apt
have normal ruby installed with a bunch of gems

have compat.version set to 2.0 in .jrubyrc

Expected Behavior

#! /usr/bin/jruby
#! /usr/bin/env ruby
module M

	refine Array do

		def a; end

	end

end

With MRI this gives no output, but obviously also refinements work.

Actual Behavior

With jruby this gives:

NoMethodError: undefined method `refine' for M:Module
       M at ./test.rb:5
  (root) at ./test.rb:3

As far as I understand from reading around jruby supports refinements, so I'm a bit baffled, since google didn't bring anything up.

@kares
Copy link
Member

kares commented Feb 4, 2017

JRuby does support refinements but only in 9K (1.7.x basically supports Ruby 1.9.3 with some 2.0 features).

@kares kares closed this as completed Feb 4, 2017
@kares kares added this to the Won't Fix milestone Feb 4, 2017
@najamelan
Copy link
Author

Thanks alot, I didn't understand the jruby version numbers. This works right now.

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

No branches or pull requests

2 participants