lib/rib/shell.rb in rib-1.2.4 vs lib/rib/shell.rb in rib-1.2.5
- old
+ new
@@ -67,16 +67,16 @@
private
# Avoid namespace pollution from rubygems bin stub.
# To be specific, version and str.
def new_private_binding
- TOPLEVEL_BINDING.instance_eval do
+ TOPLEVEL_BINDING.eval <<-RUBY
singleton_class.module_eval do
Rib.warn("Removing existing main...") if method_defined?(:main)
def main; binding; end # any way to define <main> method?
end
ret = main
singleton_class.send(:remove_method, 'main') # never pollute anything
ret
- end
+ RUBY
end
end