Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
RubyVM::InstructionSequence#source_hash
source_hash
iseq.c
View on GitHub ↗
static VALUE
iseqw_source_hash(VALUE self)
{
const rb_iseq_t *iseq = iseqw_check(self);
if (!ISEQ_BODY(iseq)->source_hash) return Qnil;
return ULL2NUM(ISEQ_BODY(iseq)->source_hash);
}
Returns the hash of the source this iseq was compiled from, or nil if it is unavailable.