summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-29 03:20:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-29 03:20:04 +0000
commit946a037e3022c4667f22ca92b64379315f9535c0 (patch)
treee00e3a0b5dd67c89d42b21f53edebcde25030451 /load.c
parent909d638aecb3597536e912599f5ee355aac828c0 (diff)
* 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/load.c b/load.c
index 891eae48ee..c956977527 100644
--- a/load.c
+++ b/load.c
@@ -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