lib/irb/ext/loader.rb in irb-1.7.0 vs lib/irb/ext/loader.rb in irb-1.7.1
- old
+ new
@@ -40,10 +40,11 @@
# Loads a given file in the current session and displays the source lines
#
# See Irb#suspend_input_method for more information.
def source_file(path)
+ irb = irb_context.irb
irb.suspend_name(path, File.basename(path)) do
FileInputMethod.open(path) do |io|
irb.suspend_input_method(io) do
|back_io|
irb.signal_status(:IN_LOAD) do
@@ -64,9 +65,10 @@
# Loads the given file in the current session's context and evaluates it.
#
# See Irb#suspend_input_method for more information.
def load_file(path, priv = nil)
+ irb = irb_context.irb
irb.suspend_name(path, File.basename(path)) do
if priv
ws = WorkSpace.new(Module.new)
else