Skip to content

JRuby 2.2 mode inconsistent with MRI 2.1+ #3507

@envygeeks

Description

@envygeeks

As it stands JRuby 2.2 mode (on 9.0.3.0) is inconsistent with MRI 2.1+ when it comes to module_function and define_method behavior. Take the following sample:

module MyModule module_function
  methods = { :hello => :world }
  methods.each do |key, val|
    define_method key do
      val
    end
  end
end

In Ruby 2.0 module_function is not inherited, but in 2.1+ it is inherited, this leads to inconsistent behavior when moving between JRuby and MRI.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions