mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
load.c: remove a redundant rb_str_freeze call
rb_file_expand_path_fast already performs the buffer shrinking rb_str_freeze does (via expand_path macro in file.c); the result of rb_fstring is always frozen, and that rb_fstring call is the last use of `expanded_path` in its scope. load.c (rb_construct_expanded_load_path): remove rb_str_freeze git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a7419814c
commit
b7ad549654
1 changed files with 0 additions and 1 deletions
1
load.c
1
load.c
|
@ -86,7 +86,6 @@ rb_construct_expanded_load_path(enum expand_type type, int *has_relative, int *h
|
||||||
rb_str_freeze(path);
|
rb_str_freeze(path);
|
||||||
as_str = rb_get_path_check_convert(path, as_str, level);
|
as_str = rb_get_path_check_convert(path, as_str, level);
|
||||||
expanded_path = rb_file_expand_path_fast(as_str, Qnil);
|
expanded_path = rb_file_expand_path_fast(as_str, Qnil);
|
||||||
rb_str_freeze(expanded_path);
|
|
||||||
rb_ary_push(ary, rb_fstring(expanded_path));
|
rb_ary_push(ary, rb_fstring(expanded_path));
|
||||||
}
|
}
|
||||||
rb_obj_freeze(ary);
|
rb_obj_freeze(ary);
|
||||||
|
|
Loading…
Reference in a new issue