mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Simplify Pry::CommandSet#each.
This commit is contained in:
parent
774e19c394
commit
b661517974
1 changed files with 1 additions and 7 deletions
|
@ -123,13 +123,7 @@ class Pry
|
|||
end
|
||||
|
||||
def each &block
|
||||
if block_given?
|
||||
@commands.each do |name, struct|
|
||||
yield(name, struct)
|
||||
end
|
||||
else
|
||||
@commands.to_enum
|
||||
end
|
||||
@commands.each(&block)
|
||||
end
|
||||
|
||||
# Removes some commands from the set
|
||||
|
|
Loading…
Reference in a new issue