diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 8aa7d27d..63b5f915 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -616,7 +616,7 @@ def stashes_all end def stash_save(message) - output = command('stash save', ['--', message]) + output = command('stash save', [message]) output =~ /HEAD is now at/ end @@ -1052,9 +1052,9 @@ def encoding_options def normalize_encoding(str) return str if str.valid_encoding? && str.encoding == default_encoding - return str.encode(default_encoding, str.encoding, encoding_options) if str.valid_encoding? + return str.encode(default_encoding, str.encoding, **encoding_options) if str.valid_encoding? - str.encode(default_encoding, detected_encoding(str), encoding_options) + str.encode(default_encoding, detected_encoding(str), **encoding_options) end def run_command(git_cmd, &block) diff --git a/tests/test_helper.rb b/tests/test_helper.rb index 3f5a4665..565ee1fe 100644 --- a/tests/test_helper.rb +++ b/tests/test_helper.rb @@ -3,7 +3,7 @@ require 'logger' require 'test/unit' -require "#{File.expand_path(File.dirname(__FILE__))}/../lib/git" +require "git" class Test::Unit::TestCase