lib/options.rb in options-2.1.1 vs lib/options.rb in options-2.2.0
- old
+ new
@@ -1,7 +1,7 @@
module Options
- VERSION = '2.1.1'
+ Options::VERSION = '2.2.0' unless defined?(Options::VERSION)
class << Options
def version
Options::VERSION
end
@@ -166,10 +166,14 @@
def popped?
defined?(@popped) and @popped
end
def pop!
- @popped = arguments.pop
+ if arguments.last.is_a?(Hash)
+ @popped = arguments.pop
+ else
+ @popped = true
+ end
end
# Validates that the options provided are acceptable.
#
# @param [Symbol] *acceptable_options List of options that are