Permalink
Browse files

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
  • Loading branch information...
1 parent c2a41b6 commit 765f0177c6135914d950c7f092cfbf38388e4f69 @banister banister committed Apr 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/pry/method.rb
View
@@ -254,7 +254,7 @@ def source
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

0 comments on commit 765f017

Please sign in to comment.