1
0
Fork 0
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:
Rob Gleeson 2011-05-30 19:09:52 +01:00
parent 774e19c394
commit b661517974

View file

@ -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