Permalink
Browse files

Show current_module in ConstantScope#inspect

  • Loading branch information...
1 parent 4f20407 commit 807f36c459743f38b3d175f8ce9202ad756ab9be @ryoqun ryoqun committed Mar 22, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 kernel/common/constant_scope.rb
View
3 kernel/common/constant_scope.rb
@@ -38,7 +38,8 @@ def initialize(mod, par = nil)
attr_accessor :flip_flops
def inspect
- "#<#{self.class.name}:0x#{self.object_id.to_s(16)} parent=#{@parent.inspect} module=#{@module}>"
+ current = " current=#{@current_module}" if @current_module
+ "#<#{self.class.name}:0x#{self.object_id.to_s(16)} parent=#{@parent.inspect} module=#{@module}#{current}>"
end
def to_s

0 comments on commit 807f36c

Please sign in to comment.