ruby-changes:17557
From: yugui <ko1@a...>
Date: Sat, 23 Oct 2010 18:36:56 +0900 (JST)
Subject: [ruby-changes:17557] Ruby:r29562 (ruby_1_9_2): merges r29133 from trunk into ruby_1_9_2.
yugui 2010-10-23 18:36:38 +0900 (Sat, 23 Oct 2010) New Revision: 29562 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29562 Log: merges r29133 from trunk into ruby_1_9_2. -- * load.c (load_failed): should honor encoding. [ruby-core:31915] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/load.c branches/ruby_1_9_2/test/ruby/test_require.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 29561) +++ ruby_1_9_2/ChangeLog (revision 29562) @@ -1,3 +1,7 @@ +Sun Aug 29 12:19:58 2010 Nobuyoshi Nakada <nobu@r...> + + * load.c (load_failed): should honor encoding. [ruby-core:31915] + Fri Aug 27 12:26:23 2010 NAKAMURA Usaku <usa@r...> * object.c (rb_obj_class): remove mention of obsolete method. Index: ruby_1_9_2/load.c =================================================================== --- ruby_1_9_2/load.c (revision 29561) +++ ruby_1_9_2/load.c (revision 29562) @@ -550,8 +550,9 @@ static void load_failed(VALUE fname) { - rb_raise(rb_eLoadError, "no such file to load -- %s", - RSTRING_PTR(fname)); + VALUE mesg = rb_str_buf_new_cstr("no such file to load -- "); + rb_str_append(mesg, fname); /* should be ASCII compatible */ + rb_exc_raise(rb_exc_new3(rb_eLoadError, mesg)); } static VALUE Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 29561) +++ ruby_1_9_2/version.h (revision 29562) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 15 +#define RUBY_PATCHLEVEL 16 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_2/test/ruby/test_require.rb =================================================================== --- ruby_1_9_2/test/ruby/test_require.rb (revision 29561) +++ ruby_1_9_2/test/ruby/test_require.rb (revision 29562) @@ -40,6 +40,12 @@ end end + def test_require_nonascii + bug3758 = '[ruby-core:31915]' + e = assert_raise(LoadError, bug3758) {require "\u{221e}"} + assert_match(/\u{221e}\z/, e.message, bug3758) + end + def test_require_path_home env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/