diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-29 03:20:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-29 03:20:04 +0000 |
commit | 946a037e3022c4667f22ca92b64379315f9535c0 (patch) | |
tree | e00e3a0b5dd67c89d42b21f53edebcde25030451 /load.c | |
parent | 909d638aecb3597536e912599f5ee355aac828c0 (diff) | |
download | ruby-946a037e3022c4667f22ca92b64379315f9535c0.tar.gz |
* load.c (load_failed): should honor encoding. [ruby-core:31915]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -551,8 +551,9 @@ search_required(VALUE fname, volatile VALUE *path, int safe_level) static void load_failed(VALUE fname) { - rb_raise(rb_eLoadError, "cannot load such file -- %s", - RSTRING_PTR(fname)); + VALUE mesg = rb_str_buf_new_cstr("cannot load such file -- "); + rb_str_append(mesg, fname); /* should be ASCII compatible */ + rb_exc_raise(rb_exc_new3(rb_eLoadError, mesg)); } static VALUE |