summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-23 09:36:38 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-23 09:36:38 +0000
commit738e62a3f11871ec361b32ca7efdec0d3ab0c968 (patch)
tree5ab42990d0d8b5fd29c3f3091af1a03212c4e39a /load.c
parentcfa233b52e85c78192900b69a965adb406dda1b7 (diff)
merges r29133 from trunk into ruby_1_9_2.
-- * load.c (load_failed): should honor encoding. [ruby-core:31915] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29562 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 fc2c9bf52e..f8f0551a5a 100644
--- a/load.c
+++ b/load.c
@@ -550,8 +550,9 @@ search_required(VALUE fname, volatile VALUE *path, int safe_level)
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