From f35308b3ef20be1716660a751087b4e726db2171 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 19 Feb 2009 06:11:41 +0000 Subject: * eval_intern.h (translit_char): moved from ruby.c. * load.c (load_ext): transliterates file separators and back if needed. * symbian/setup (DLN_NEEDS_ALT_SEPARATOR): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- load.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'load.c') diff --git a/load.c b/load.c index f642019053..5f72d5510a 100644 --- a/load.c +++ b/load.c @@ -529,8 +529,17 @@ load_failed(VALUE fname) static VALUE load_ext(VALUE path) { + VALUE result; + SCOPE_SET(NOEX_PUBLIC); - return (VALUE)dln_load(RSTRING_PTR(path)); +#if defined DLN_NEEDS_ALT_SEPARATOR && DLN_NEEDS_ALT_SEPARATOR + translit_char(RSTRING_PTR(path), '/', '\\'); +#endif + result = (VALUE)dln_load(RSTRING_PTR(path)); +#if defined DLN_NEEDS_ALT_SEPARATOR && DLN_NEEDS_ALT_SEPARATOR + translit_char(RSTRING_PTR(path), '\\', '/'); +#endif + return result; } VALUE -- cgit v1.2.3