summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/models/c_expr.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/ruby_vm/models/c_expr.rb')
-rw-r--r--tool/ruby_vm/models/c_expr.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/ruby_vm/models/c_expr.rb b/tool/ruby_vm/models/c_expr.rb
index 073112f545..4b5aec58dd 100644
--- a/tool/ruby_vm/models/c_expr.rb
+++ b/tool/ruby_vm/models/c_expr.rb
@@ -36,6 +36,10 @@ class RubyVM::CExpr
end
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