diff options
| -rw-r--r-- | tasks/mruby_build.rake | 1 | ||||
| -rw-r--r-- | tasks/mruby_build_commands.rake | 12 | ||||
| -rw-r--r-- | tasks/mruby_build_gem.rake | 6 | ||||
| -rw-r--r-- | test/t/string.rb | 4 | ||||
| -rw-r--r-- | travis_config.rb | 1 |
5 files changed, 20 insertions, 4 deletions
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake index 3c0a67179..c65ad4c20 100644 --- a/tasks/mruby_build.rake +++ b/tasks/mruby_build.rake @@ -102,6 +102,7 @@ module MRuby def enable_cxx_abi return if @cxx_abi_enabled compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) } + linker.command = cxx.command @cxx_abi_enabled = true end diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index b0965ea09..24a77206a 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -24,9 +24,17 @@ module MRuby target end + NotFoundCommands = {} + private def _run(options, params={}) - sh build.filename(command) + ' ' + ( options % params ) + return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command + begin + sh build.filename(command) + ' ' + ( options % params ) + rescue RuntimeError + NotFoundCommands[@command] = true + _run options, params + end end end @@ -225,7 +233,7 @@ module MRuby def initialize(build) super @command = 'git' - @flags = [] + @flags = %w[--depth 1] @clone_options = "clone %{flags} %{url} %{dir}" @pull_options = "pull" end diff --git a/tasks/mruby_build_gem.rake b/tasks/mruby_build_gem.rake index c9bf794e3..5e4566f8d 100644 --- a/tasks/mruby_build_gem.rake +++ b/tasks/mruby_build_gem.rake @@ -43,7 +43,11 @@ module MRuby if params[:github] params[:git] = "https://github.com/#{params[:github]}.git" elsif params[:bitbucket] - params[:git] = "https://bitbucket.org/#{params[:bitbucket]}.git" + if params[:method] == "ssh" + params[:git] = "[email protected]:#{params[:bitbucket]}.git" + else + params[:git] = "https://bitbucket.org/#{params[:bitbucket]}.git" + end end if params[:core] diff --git a/test/t/string.rb b/test/t/string.rb index 3219f98c3..2ebaad1b7 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -36,6 +36,10 @@ end assert('String#*', '15.2.10.5.5') do assert_equal 'aaaaa', 'a' * 5 + assert_equal '', 'a' * 0 + assert_raise(ArgumentError) do + 'a' * -1 + end end assert('String#[]', '15.2.10.5.6') do diff --git a/travis_config.rb b/travis_config.rb index e29a066ec..4c9e623fe 100644 --- a/travis_config.rb +++ b/travis_config.rb @@ -32,6 +32,5 @@ MRuby::Build.new('cxx_abi') do |conf| end conf.enable_bintest = true - conf.linker.command = 'g++' enable_cxx_abi end |
