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

got rid of Pry.commands.dup in pry_class for run_command as it fixes Rubinius compatibility and other subtle bugs related to YARV and RBX not correctly dupping singleton class ancestor chains

This commit is contained in:
John Mair 2011-04-24 12:05:41 +12:00
parent 40057d280b
commit d64b0f82cc

View file

@ -187,12 +187,7 @@ class Pry
null_output = Object.new.tap { |v| v.instance_eval { def puts(*) end } }
# FIXME! ugly hack to get around broken methods in both YARV and RBX
if RUBY_VERSION =~ /1.9/
commands = options[:commands].dup
else
commands = options[:commands].clone
end
commands = options[:commands]
commands.output = options[:show_output] ? options[:output] : null_output
commands.target = Pry.binding_for(options[:context])