diff options
-rw-r--r-- | process.c | 2 | ||||
-rw-r--r-- | test/ruby/test_process.rb | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -2325,7 +2325,7 @@ check_exec_env_i(st_data_t st_key, st_data_t st_val, st_data_t arg) k = StringValueCStr(key); if (strchr(k, '=')) - rb_raise(rb_eArgError, "environment name contains a equal : %s", k); + rb_raise(rb_eArgError, "environment name contains a equal : %"PRIsVALUE, key); if (!NIL_P(val)) StringValueCStr(val); diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index e9c7ee62b2..7170e826d5 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -342,6 +342,9 @@ class TestProcess < Test::Unit::TestCase assert_raise_with_message(ArgumentError, /fo=fo/) { system({"fo=fo"=>"ha"}, *ENVCOMMAND) } + assert_raise_with_message(ArgumentError, /\u{30c0}=\u{30e1}/) { + system({"\u{30c0}=\u{30e1}"=>"ha"}, *ENVCOMMAND) + } end def test_execopt_env_path |