-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment
- JRuby version
jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae OpenJDK 64-Bit Server VM 25.151-b12 on 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12 +jit [linux-x86_64] - Ubuntu 16.04
Expected Behavior
I override Module.inspect via a module (Inspect), A.inspect produces the correct result.
module Inspect
def inspect
"nice view!"
end
end
module A
extend Inspect
def self.a
end
end
A.inspect #=> "nice view!"I am expecting the same inspect being used when inspecting a method instance from A.
puts A.method(:a).inspect #=> #<Method: nice view!.a>This is the behavior in Ruby 2.5.
Actual Behavior
However, in Jruby it seems as if inspect doesn't use the correct version of A.inspect, but the original one.
# jruby 9.1.7
puts A.method(:a).inspect #=> #<Method: A.a>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels