Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary usage of rb_realpath_internal
  • Loading branch information
LTe committed Jul 5, 2012
commit f58d7c686c469cbddcaa079fd65d88eb08949648
2 changes: 1 addition & 1 deletion load.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ rb_f_require_relative(VALUE obj, VALUE fname)
VALUE path = rb_find_file(FilePathValue(fname));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also rb_find_file() is not needed, since rb_require_safe() calls it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks for feedback :)

if (!path)
path = fname;
return rb_require_safe(rb_realpath_internal(Qnil, path, 0), rb_safe_level());
return rb_require_safe(path, rb_safe_level());
}
base = rb_file_dirname(base);
return rb_require_safe(rb_file_absolute_path(fname, base), rb_safe_level());
Expand Down