Skip to content

Set original Module to definedClass of methods#4944

Closed
yui-knk wants to merge 1 commit intojruby:masterfrom
yui-knk:test_alias_owner_2
Closed

Set original Module to definedClass of methods#4944
yui-knk wants to merge 1 commit intojruby:masterfrom
yui-knk:test_alias_owner_2

Conversation

@yui-knk
Copy link
Contributor

@yui-knk yui-knk commented Jan 6, 2018

Set original Module to definedClass of methods when
new methods are defined to PrependedModule.

Before this commit, definedClass of method a
is class c but definedClass of method b
is PrependedModule:

M = Module.new
c = Class.new {
  def a; end
  prepend M
  def b; end
}

This commit will set definedClass of method b
to class c and fix TestMethod#test_alias_owner.

Set original Module to definedClass of methods when
new methods are defined to PrependedModule.

Before this commit, definedClass of method a
is class c but definedClass of method b
is PrependedModule:

```
M = Module.new
c = Class.new {
  def a; end
  prepend M
  def b; end
}
```

This commit will set definedClass of method b
to class c and fix `TestMethod#test_alias_owner`.
@headius
Copy link
Member

headius commented Jan 8, 2018

I will review for inclusion in 9.1.16.

@headius
Copy link
Member

headius commented Jan 8, 2018

Manually merged to 9.1 branch in ce434ec. It will merge to master when @enebo gets to that later this week.

@headius headius closed this Jan 8, 2018
@headius
Copy link
Member

headius commented Jan 8, 2018

Thank you for your help!

@headius headius added this to the JRuby 9.1.16.0 milestone Jan 8, 2018
@headius headius added the core label Jan 8, 2018
@yui-knk yui-knk deleted the test_alias_owner_2 branch January 8, 2018 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants