Permalink
Browse files

Use TOPLEVEL_BINDING instead of instance_of

  • Loading branch information...
1 parent c0c6c08 commit ea6c7da7278a7fd8d119ab6247d38a711ea68609 @jberkel committed Mar 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/interactive_editor.rb
@@ -18,7 +18,7 @@ def initialize(editor)
end
def edit(object, file=nil)
- object = object.instance_of?(Object) ? nil : object
+ object = object == TOPLEVEL_BINDING.eval('self') ? nil : object
current_file = if file
FileUtils.touch(file) unless File.exist?(file)

0 comments on commit ea6c7da

Please sign in to comment.