[macruby-changes] [3173] MacRuby/trunk/load.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 24 18:13:15 PST 2009
Revision: 3173
http://trac.macosforge.org/projects/ruby/changeset/3173
Author: lsansonetti at apple.com
Date: 2009-12-24 18:13:12 -0800 (Thu, 24 Dec 2009)
Log Message:
-----------
#require: make sure the given argument is handled as a path, not a string
Modified Paths:
--------------
MacRuby/trunk/load.c
Modified: MacRuby/trunk/load.c
===================================================================
--- MacRuby/trunk/load.c 2009-12-24 23:18:43 UTC (rev 3172)
+++ MacRuby/trunk/load.c 2009-12-25 02:13:12 UTC (rev 3173)
@@ -261,19 +261,18 @@
VALUE
rb_require_safe(VALUE fname, int safe)
{
- StringValue(fname);
+ FilePathValue(fname);
- VALUE result = Qnil;
- VALUE path;
- int type = 0;
-
// Immediately, check out if we have an AOT feature for this.
if (rb_vm_aot_feature_load(RSTRING_PTR(fname))) {
rb_provide_feature(fname);
return Qtrue;
}
- FilePathValue(fname);
+ VALUE result = Qnil;
+ VALUE path;
+ int type = 0;
+
if (search_required(fname, &path, &type)) {
if (path == 0) {
result = Qfalse;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091224/27afe03b/attachment.html>
More information about the macruby-changes
mailing list