diff --git a/src/main/ruby/truffleruby/core/posix.rb b/src/main/ruby/truffleruby/core/posix.rb index 040094b190a..cc5624f3208 100644 --- a/src/main/ruby/truffleruby/core/posix.rb +++ b/src/main/ruby/truffleruby/core/posix.rb @@ -489,7 +489,7 @@ def self.read_string_polyglot(io, length) end end - def self.pread_string_native(io, length, offset) + def self.pread_string(io, length, offset) fd = io.fileno buffer = Primitive.io_thread_buffer_allocate(length) @@ -508,10 +508,6 @@ def self.pread_string_native(io, length, offset) end end - def self.pread_string_polyglot(io, length, offset) - raise 'Not implemented' # there is not way to read starting from a specific position - end - # #write_string (either #write_string_native or #write_string_polyglot) is # called by IO#syswrite, IO#write, and IO::InternalBuffer#empty_to @@ -604,7 +600,7 @@ def self.write_string_nonblock_polyglot(io, string) end end - def self.pwrite_string_native(io, string, offset) + def self.pwrite_string(io, string, offset) fd = io.fileno length = string.bytesize buffer = Primitive.io_thread_buffer_allocate(length) @@ -621,10 +617,6 @@ def self.pwrite_string_native(io, string, offset) end end - def self.pwrite_string_polyglot(io, length, offset) - raise 'Not implemented' # there is not way to write starting from a specific position - end - # Select between native and polyglot variants Truffle::Boot.delay do @@ -632,19 +624,15 @@ def self.pwrite_string_polyglot(io, length, offset) class << self alias_method :read_string, :read_string_polyglot alias_method :read_to_buffer, :read_to_buffer_polyglot - alias_method :pread_string, :pread_string_polyglot alias_method :write_string, :write_string_polyglot alias_method :write_string_nonblock, :write_string_nonblock_polyglot - alias_method :pwrite_string, :pwrite_string_polyglot end else class << self alias_method :read_string, :read_string_native alias_method :read_to_buffer, :read_to_buffer_native - alias_method :pread_string, :pread_string_native alias_method :write_string, :write_string_native alias_method :write_string_nonblock, :write_string_nonblock_native - alias_method :pwrite_string, :pwrite_string_native end end end