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
1 changed files with 1 additions and 6 deletions

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])