From e48ed7c6bcc57a0f6ebabd12e35c2b6ff3a7c50c Mon Sep 17 00:00:00 2001 From: Steven Harman Date: Tue, 24 Jun 2014 16:07:30 -0400 Subject: [PATCH] Clean up ambiguous method warnings When running with Ruby warnings, these usages of `#match` are ambiguous, but can be made explicit with parens. --- lib/pry/commands/bang.rb | 2 +- spec/command_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry/commands/bang.rb b/lib/pry/commands/bang.rb index 117835e4..8843458f 100644 --- a/lib/pry/commands/bang.rb +++ b/lib/pry/commands/bang.rb @@ -1,6 +1,6 @@ class Pry class Command::Bang < Pry::ClassCommand - match /^\s*!\s*$/ + match(/^\s*!\s*$/) group 'Editing' description 'Clear the input buffer.' command_options :use_prefix => false diff --git a/spec/command_spec.rb b/spec/command_spec.rb index f493f14f..56432726 100644 --- a/spec/command_spec.rb +++ b/spec/command_spec.rb @@ -711,7 +711,7 @@ describe "Pry::Command" do it "equals to :match option's inspect, if :match is Regexp" do class CoolWinter < Pry::ClassCommand - match /.*winter/ + match(/.*winter/) description 'Is winter cool or cool?' end Pry.config.commands.add_command CoolWinter