mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
very minor api tweak
This commit is contained in:
parent
9ec55d0841
commit
696a2f1a82
2 changed files with 2 additions and 1 deletions
|
@ -210,6 +210,7 @@ class Pry
|
|||
# @return [Code]
|
||||
def grep(pattern)
|
||||
return self unless pattern
|
||||
pattern = Regexp.new(pattern)
|
||||
|
||||
select do |l, ln|
|
||||
l =~ pattern
|
||||
|
|
|
@ -189,7 +189,7 @@ class Pry
|
|||
end
|
||||
|
||||
if opts.present?(:grep)
|
||||
@history = @history.grep(Regexp.new(opts[:grep]))
|
||||
@history = @history.grep(opts[:grep])
|
||||
end
|
||||
|
||||
unless opts.present?(:'no-numbers')
|
||||
|
|
Loading…
Add table
Reference in a new issue