Fix RubyVM::CExpr#inspect
@__LINE__ can be nil which causes the inspect method to fail.
This commit is contained in:
parent
05f016cdad
commit
d2631c427e
Notes:
git
2023-02-24 19:10:29 +00:00
@ -36,6 +36,10 @@ class RubyVM::CExpr
|
|||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
def inspect
|
||||||
sprintf "#<%s:%d %s>", @__FILE__, @__LINE__, @expr
|
if @__LINE__
|
||||||
|
sprintf "#<%s:%d %s>", @__FILE__, @__LINE__, @expr
|
||||||
|
else
|
||||||
|
sprintf "#<%s %s>", @__FILE__, @expr
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user