提交 026b6daa 编写于 作者: R Rafael Mendonça França

Merge pull request #12729 from arunagw/build-fixed-ruby193

Can't used named argument in ruby 1.9.3
......@@ -6,6 +6,7 @@
require 'open-uri'
require 'uri'
require 'rails/generators/base'
require 'active_support/core_ext/array/extract_options'
module Rails
module Generators
......@@ -86,7 +87,12 @@ def initialize(*args)
protected
def gemfile_entry(name, version = nil, github: nil, path: nil)
def gemfile_entry(name, *args)
options = args.extract_options!
version = args.first
github = options[:github]
path = options[:path]
if github
@extra_entries << GemfileEntry.github(name, github)
elsif path
......
......@@ -6,7 +6,7 @@ module Rails
module Generators
class GeneratorTest < ActiveSupport::TestCase
def make_builder_class
klass = Class.new(AppBase) do
Class.new(AppBase) do
add_shared_options_for "application"
# include a module to get around thor's method_added hook
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册