ruby-changes:13070
From: nobu <ko1@a...>
Date: Wed, 9 Sep 2009 15:46:51 +0900 (JST)
Subject: [ruby-changes:13070] Ruby:r24817 (trunk): * load.c (rb_feature_provided): fixed for autoloading extension
nobu 2009-09-09 15:46:31 +0900 (Wed, 09 Sep 2009) New Revision: 24817 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24817 Log: * load.c (rb_feature_provided): fixed for autoloading extension library without suffix. Added files: trunk/test/ruby/test_autoload.rb Modified files: trunk/ChangeLog trunk/load.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24816) +++ ChangeLog (revision 24817) @@ -1,6 +1,12 @@ +Wed Sep 9 15:46:28 2009 Nobuyoshi Nakada <nobu@r...> + + * load.c (rb_feature_provided): fixed for autoloading extension + library without suffix. + Wed Sep 9 15:24:32 2009 TAKANO Mitsuhiro (takano32) <tak@n...> * include/ruby/st.h : revert previous commit. + * ext/objspace/objspace.c : remove st_memsize declare. Wed Sep 9 14:07:19 2009 TAKANO Mitsuhiro (takano32) <tak@n...> Index: load.c =================================================================== --- load.c (revision 24816) +++ load.c (revision 24817) @@ -233,7 +233,7 @@ return FALSE; } } - if (rb_feature_p(feature, feature + strlen(feature), TRUE, FALSE, loading)) + if (rb_feature_p(feature, 0, TRUE, FALSE, loading)) return TRUE; return FALSE; } @@ -473,7 +473,7 @@ OBJ_FREEZE(tmp); if (rb_find_file_ext_safe(&tmp, loadable_ext + 1, safe_level)) { ext = strrchr(ftptr = RSTRING_PTR(tmp), '.'); - if (!rb_feature_p(ftptr, ext, Qfalse, Qtrue, &loading) || loading) + if (!rb_feature_p(ftptr, ext, FALSE, TRUE, &loading) || loading) *path = tmp; return 's'; } Index: test/ruby/test_autoload.rb =================================================================== --- test/ruby/test_autoload.rb (revision 0) +++ test/ruby/test_autoload.rb (revision 24817) @@ -0,0 +1,12 @@ +require 'test/unit' +require_relative 'envutil' + +class TestAutoload < Test::Unit::TestCase + def test_autoload_so + # Continuation is always available, unless excluded intentionally. + assert_in_out_err([], <<-INPUT, [], []) + autoload :Continuation, "continuation" + begin Continuation; rescue LoadError; end + INPUT + end +end Property changes on: test/ruby/test_autoload.rb ___________________________________________________________________ Name: svn:eol-style + LF Name: svn:keywords + Author Id Revision -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/