better fix...

This commit is contained in:
Conrad Irwin 2012-01-28 19:50:38 -08:00
parent fe4850eff1
commit 83e2e6a8ca
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class Pry
BANNER
def process(pattern=nil)
pattern = Regexp.compile(pattern)
pattern = Regexp.compile(pattern || '')
gems = if Gem::Specification.respond_to?(:each)
Gem::Specification.select{|spec| spec.name =~ pattern }.group_by(&:name)
else

View File

@ -7,7 +7,7 @@ describe "Pry::DefaultCommands::Gems" do
it 'should not raise when invoked' do
str_output = StringIO.new
Pry.start self, :input => InputTester.new("gem-list", "exit-all"), :output => str_output
str_output.string.should.not =~ /NoMethodError/
str_output.string.should.not =~ /Error/
end
it 'should not raise when invoked with an argument' do