diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getoptlong.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb index 2d3b617d6b..7bd9ee55cc 100644 --- a/lib/getoptlong.rb +++ b/lib/getoptlong.rb @@ -282,8 +282,11 @@ class GetoptLong @canonical_names.clear @argument_flags.clear - arguments.each do |*arg| - arg = arg.first # TODO: YARV Hack + arguments.each do |arg| + if !arg.is_a?(Array) + raise ArgumentError, "the option list contains non-Array argument" + end + # # Find an argument flag and it set to `argument_flag'. # |