diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-22 16:21:09 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-22 16:21:09 +0000 |
commit | 98aac1e6519eb7c09bc089c65fa804ed6c011ac2 (patch) | |
tree | 1620594b2751e6367a5e826780f8e23fadf075ee | |
parent | e0d24f31edddb51468cd34e0bb7891c7d5095af0 (diff) | |
download | ruby-98aac1e6519eb7c09bc089c65fa804ed6c011ac2.tar.gz |
* ruby.c (process_options): don't specify .so for encdb here.
"." is replaced by "_" in load_encoding.
* encoding.c (load_encoding): add .so here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | encoding.c | 4 | ||||
-rw-r--r-- | ruby.c | 2 |
3 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,10 @@ +Tue Jun 23 01:17:38 2009 Tanaka Akira <akr@fsij.org> + + * ruby.c (process_options): don't specify .so for encdb here. + "." is replaced by "_" in load_encoding. + + * encoding.c (load_encoding): add .so here. + Mon Jun 22 23:24:22 2009 Yukihiro Matsumoto <matz@ruby-lang.org> * variable.c (rb_generic_ivar_memsize): typo fixed. a patch from diff --git a/encoding.c b/encoding.c index e051e8d69b..2f0b9797db 100644 --- a/encoding.c +++ b/encoding.c @@ -456,11 +456,11 @@ require_enc(VALUE enclib) static int load_encoding(const char *name) { - VALUE enclib = rb_sprintf("enc/%s", name); + VALUE enclib = rb_sprintf("enc/%s.so", name); VALUE verbose = ruby_verbose; VALUE debug = ruby_debug; VALUE loaded; - char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib); + char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib) - 3; int idx; while (s < e) { @@ -1298,7 +1298,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt) rb_obj_freeze(opt->script_name); ruby_init_loadpath_safe(opt->safe_level); - rb_enc_find_index("encdb.so"); + rb_enc_find_index("encdb"); lenc = rb_locale_encoding(); rb_enc_associate(rb_progname, lenc); parser = rb_parser_new(); |