changed Pry.run_command so it works on both rbx (using Object#clone)
and YARV 1.9 (using Object#dup). Both implementations have bugs.
This commit is contained in:
parent
d95e787dac
commit
b64bb6021d
|
@ -179,7 +179,13 @@ class Pry
|
|||
|
||||
null_output = Object.new.tap { |v| v.instance_eval { def puts(*) end } }
|
||||
|
||||
commands = options[:commands].dup
|
||||
# FIXME! ugly hack to get around broken methods in both YARD and RBX
|
||||
if RUBY_VERSION =~ /1.9/
|
||||
commands = options[:commands].dup
|
||||
else
|
||||
commands = options[:commands].clone
|
||||
end
|
||||
|
||||
commands.output = options[:show_output] ? options[:output] : null_output
|
||||
commands.target = Pry.binding_for(options[:context])
|
||||
|
||||
|
|
Loading…
Reference in New Issue