Author: kkaempf Date: Mon Jul 25 15:25:44 2011 New Revision: 64990 URL: http://svn.opensuse.org/viewcvs/yast?rev=64990&view=rev Log: simplify call to require(). Just call rb_require instead of rb_eval_string("require ...") Modified: trunk/ruby-bindings/src/ruby/YRuby.cc Modified: trunk/ruby-bindings/src/ruby/YRuby.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/src/ruby/YRuby.cc?rev=64990&r1=64989&r2=64990&view=diff ============================================================================== --- trunk/ruby-bindings/src/ruby/YRuby.cc (original) +++ trunk/ruby-bindings/src/ruby/YRuby.cc Mon Jul 25 15:25:44 2011 @@ -126,9 +126,7 @@ string module_name = argList->value(0)->asString()->value(); string module_path = argList->value(1)->asString()->value(); //y2milestone("loadModule 3: '%s'", module_name.c_str()); - string require_module = "require(\"" + module_path + "\")"; - //y2milestone("loadModule 3.5"); - VALUE result = rb_eval_string((require_module).c_str()); + VALUE result = rb_require(module_path.c_str()); if ( result == Qfalse ) return YCPError( "Ruby::loadModule() / Can't load ruby module '" + module_path + "'" ); //y2milestone("loadModule 4"); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org