1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

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

View file

@ -254,7 +254,7 @@ class Pry
if Helpers::BaseHelpers.rbx? && !pry_method? if Helpers::BaseHelpers.rbx? && !pry_method?
code = core_code code = core_code
elsif pry_method? 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 else
code = @method.source code = @method.source
end end