replaced mini-instance with Pry::Code helper

* now using
Pry::Code.retrieve_complete_expression_from instead of Pry.new.r when extracting source
for repl-defined methods
This commit is contained in:
John Mair 2012-04-16 16:22:08 +12:00
parent c2a41b67f9
commit 765f0177c6
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ class Pry
if Helpers::BaseHelpers.rbx? && !pry_method?
code = core_code
elsif pry_method?
code = Pry.new(:input => StringIO.new(Pry.line_buffer[source_line..-1].join), :prompt => proc {""}, :hooks => Pry::Hooks.new).r
code = Pry::Code.retrieve_complete_expression_from(Pry.line_buffer[source_line..-1])
else
code = @method.source
end