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

Refinement that includes itself does not work #4236

Closed
jeremyevans opened this Issue Oct 19, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@jeremyevans
Copy link
Contributor

jeremyevans commented Oct 19, 2016

Environment

jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 OpenJDK 64-Bit Server VM 25.72-b15 on 1.8.0_72-b15 +jit [OpenBSD-x86_64]
OpenBSD foo 6.0 GENERIC.MP#0 amd64

Also tested with 9.1.1.0 on Windows, same issue.

Expected Behavior

module S
  private

  def S(v) p v; end

  refine Object do
    include S
  end
end

using S
S(1)

On ruby, prints 1.

Actual Behavior

On jruby:

NoMethodError: undefined method `S' for main:Object
  <main> at /home/billg/refinement_test.rb:12
@headius

This comment has been minimized.

Copy link
Member

headius commented Feb 26, 2019

This works after #5604 and #5627.

@headius headius added this to the JRuby 9.2.7.0 milestone Feb 26, 2019

@headius

This comment has been minimized.

Copy link
Member

headius commented Mar 7, 2019

Both PRs and additional fixes have been merged.

@headius headius closed this Mar 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.