Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyYARV bytecodeSingle-choice MCQ

Calling `RubyVM::InstructionSequence.of` on the method object returned by an `attr_accessor`-generated getter returns `nil`, while it returns an ISeq for a normal Ruby-defined method. Why?

class Point attr_accessor :x end m = Point.instance_method(:x) RubyVM::InstructionSequence.of(m) # => nil