From e784a1a02415c54f6b59d82e669791eacc68085d Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Sun, 15 Jan 2012 12:21:28 -0800 Subject: [PATCH] Make pry silent with RUBYOPT=-w --- lib/pry/command.rb | 8 ++++---- lib/pry/pry_class.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pry/command.rb b/lib/pry/command.rb index 337b5f51..7b5fcd67 100644 --- a/lib/pry/command.rb +++ b/lib/pry/command.rb @@ -16,8 +16,8 @@ class Pry class << self attr_accessor :block attr_accessor :name - attr_accessor :description - attr_accessor :command_options + attr_writer :description + attr_writer :command_options # Define or get the command's description def description(arg=nil) @@ -279,7 +279,7 @@ class Pry instance_exec(*args, &block) end - ret = call *args + ret = call(*args) self.class.hooks[:after].each do |block| ret = instance_exec(*args, &block) @@ -319,7 +319,7 @@ class Pry when arity == 0 [] when arity > 0 - args.values_at *(0..(arity - 1)).to_a + args.values_at(*(0..(arity - 1)).to_a) end end diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 44e0206e..33851953 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -233,7 +233,7 @@ class Pry config.collision_warning = false config.gist ||= OpenStruct.new - config.gist.inspecter = proc &:pretty_inspect + config.gist.inspecter = proc(&:pretty_inspect) config.plugins ||= OpenStruct.new config.plugins.enabled = true