summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jarvis <lee@jarvis.co>2011-04-14 22:37:08 +0100
committerLee Jarvis <lee@jarvis.co>2011-04-14 22:37:08 +0100
commit96792eba8ccaff2f4f5c286be4269faa127df1d1 (patch)
tree410e09812d03ced48e5f9dbf953459bdefb629e4
parent365e92bea638bbb48e270c62aafe90c77bd0abc8 (diff)
parentc89fb97be7af2e37140d272cf9bdc6d4e065d8eb (diff)
downloadslop-96792eba8ccaff2f4f5c286be4269faa127df1d1.tar.gz
Merge branch 'master' into commands
-rw-r--r--lib/slop.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/slop.rb b/lib/slop.rb
index 658ef7a..31993e8 100644
--- a/lib/slop.rb
+++ b/lib/slop.rb
@@ -112,9 +112,8 @@ class Slop
end
# Enumerable interface
- def each
- return enum_for(:each) unless block_given?
- @options.each { |option| yield option }
+ def each(&block)
+ @options.each(&block)
end
# Return the value of an option via the subscript operator.