Skip to content

Inconsistency between MRI and JRuby source location. #8079

@ioquatix

Description

@ioquatix
samuel@aiko ~/P/i/bake (modernize-gem)> ruby --version
jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21.0.2+13 on 21.0.2+13 +jit [x86_64-linux]

samuel@aiko ~/P/i/bake (modernize-gem)> cat test.rb
class Thing
	attr :name
end

puts Thing.instance_method(:name)

samuel@aiko ~/P/i/bake (modernize-gem)> chruby jruby
samuel@aiko ~/P/i/bake (modernize-gem)> ruby test.rb
#<UnboundMethod: Thing#name(@name)()>
samuel@aiko ~/P/i/bake (modernize-gem)> chruby 3.3
samuel@aiko ~/P/i/bake (modernize-gem)> ruby test.rb
#<UnboundMethod: Thing#name() test.rb:2>

I believe attr is not having the source location set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions