File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/main/ruby/truffleruby/core Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Compatibility:
43
43
* Implement negative line numbers for eval (#1482 ).
44
44
* Support refinements for ` #to_s ` called by string interpolation (#2110 , @ssnickolay )
45
45
* Module#using raises error in method scope (#2112 , @ssnickolay )
46
+ * ` File#path ` now returns a new mutable String on every call like MRI (#2115 ).
46
47
47
48
Performance:
48
49
Original file line number Diff line number Diff line change @@ -108,8 +108,6 @@ module Constants
108
108
PATH_SEPARATOR = ':'
109
109
POSIX = Truffle ::POSIX
110
110
111
- attr_reader :path
112
-
113
111
# The mode_t type is 2 bytes (ushort). Instead of getting whatever
114
112
# value happens to be in the least significant 16 bits, just set
115
113
# the value to 0 if it is greater than 0xffff. Also, negative values
@@ -1238,6 +1236,9 @@ def stat
1238
1236
Stat . fstat Primitive . io_fd ( self )
1239
1237
end
1240
1238
1239
+ def path
1240
+ @path . dup
1241
+ end
1241
1242
alias_method :to_path , :path
1242
1243
1243
1244
def truncate ( length )
You can’t perform that action at this time.
0 commit comments