lib/simplabs/excellent/parsing/cvar_context.rb in excellent-1.7.1 vs lib/simplabs/excellent/parsing/cvar_context.rb in excellent-1.7.2
- old
+ new
@@ -13,11 +13,15 @@
def full_name
return @name if !@parent
full_name = @name
parent = @parent
- parent = parent.parent until parent.is_a?(ClassContext) || parent.is_a?(ModuleContext)
- full_name = "#{parent.full_name}.#{full_name}"
+ parent = parent.parent until parent.is_a?(ClassContext) || parent.is_a?(ModuleContext) rescue nil
+ if !!parent
+ "#{parent.full_name}.#{full_name}"
+ else
+ full_name
+ end
end
end
end