Permalink
Browse files

Check for Hash before treating last argument as options in environmen…

…t template gem dsl.
  • Loading branch information...
1 parent 08a0336 commit 0fc40932581fad11504ce9f51376fdc058bef113 @shanna shanna committed with Yehuda Katz Nov 4, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bundler/templates/environment.erb
@@ -59,7 +59,7 @@ module Bundler
@except = old
end
def gem(name, *args)
- opt = args.last || {}
+ opt = args.last.is_a?(Hash) ? args.pop : {}
only = _combine_only(opt[:only] || opt["only"])
except = _combine_except(opt[:except] || opt["except"])
files = opt[:require_as] || opt["require_as"] || name

0 comments on commit 0fc4093

Please sign in to comment.