File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed
src/main/ruby/truffleruby/core Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Bug fixes:
9
9
* Fixed return value of ` Enumerable#first ` (#2056 , @LillianZ ).
10
10
* Improve reliability of the post install hook by disabling RubyGems (#2075 ).
11
11
* Fixed top level exception handler to print exception cause (#2013 ).
12
+ * Fixed issue when extending FFI from File (#2094 ).
12
13
13
14
Compatibility:
14
15
Original file line number Diff line number Diff line change @@ -102,8 +102,6 @@ module Constants
102
102
FNM_SYSCASE = File ::FNM_SYSCASE
103
103
end
104
104
105
- FFI = Truffle ::FFI
106
-
107
105
SEPARATOR = '/'
108
106
Separator = SEPARATOR
109
107
ALT_SEPARATOR = nil
@@ -847,7 +845,7 @@ def self.readable_real?(path)
847
845
# File.symlink("testfile", "link2test") #=> 0
848
846
# File.readlink("link2test") #=> "testfile"
849
847
def self . readlink ( path )
850
- FFI ::MemoryPointer . new ( Truffle ::Platform ::PATH_MAX ) do |ptr |
848
+ Truffle :: FFI ::MemoryPointer . new ( Truffle ::Platform ::PATH_MAX ) do |ptr |
851
849
n = POSIX . readlink Truffle ::Type . coerce_to_path ( path ) , ptr , Truffle ::Platform ::PATH_MAX
852
850
Errno . handle if n == -1
853
851
Original file line number Diff line number Diff line change 35
35
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
36
37
37
class IO
38
- FFI = Truffle ::FFI
39
38
40
39
include Enumerable
41
40
@@ -1560,7 +1559,7 @@ def ioctl(command, arg = 0)
1560
1559
# Most Linux ioctl codes predate the convention, so a fallback like this
1561
1560
# is still necessary.
1562
1561
buffer_size = 4096 if buffer_size < 4096
1563
- buffer = FFI ::MemoryPointer . new ( buffer_size )
1562
+ buffer = Truffle :: FFI ::MemoryPointer . new ( buffer_size )
1564
1563
buffer . write_string ( arg , arg . bytesize )
1565
1564
real_arg = buffer . address
1566
1565
else
You can’t perform that action at this time.
0 commit comments