Class: Pry::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-syntax-hacks.rb

Instance Method Summary collapse

Instance Method Details

#targetObject



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/pry-syntax-hacks.rb', line 22

def target
  unless @target.respond_to?(:unhacked_eval)
    class << @target
      alias_method :unhacked_eval, :eval

      def eval(str, *args)
        unhacked_eval(Pry.hack_line(str.dup), *args)
      end
    end
  end
  @target
end