Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
moste00 committed Oct 6, 2023
1 parent f1a6eef commit 328f508
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Bug fixes:
Compatibility:

* Add `Exception#detailed_message` method (#3257, @andrykonchin).
* Promoted `File#path` and `File#to_path` to `IO#path` and `IO#to_path` and made IO#new accept an optional `path:` keyword argument (#3275, @moste00)

Performance:

Expand Down
11 changes: 1 addition & 10 deletions src/main/ruby/truffleruby/core/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
class File < IO
include Enumerable

class FileError < RuntimeError; end

class NoFileError < FileError; end

class UnableToStat < FileError; end

class PermissionError < FileError; end

# these will be necessary when we run on Windows
DOSISH = false # Primitive.as_boolean(RUBY_PLATFORM =~ /mswin/)
CASEFOLD_FILESYSTEM = DOSISH
Expand Down Expand Up @@ -1169,8 +1161,7 @@ def initialize(path_or_fd, mode = nil, perm = nil, **options)
nmode, _binary, _external, _internal, _autoclose, perm = Truffle::IOOperations.normalize_options(mode, perm, options)
fd = IO.sysopen(path, nmode, perm)

options[:path] = path
super(fd, mode, **options)
super(fd, mode, **options, path: path)
end
end

Expand Down
1 change: 0 additions & 1 deletion src/main/ruby/truffleruby/core/io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,6 @@ def prepare_read_string(str)
def path
@path.dup
end

alias_method :to_path, :path

##
Expand Down

0 comments on commit 328f508

Please sign in to comment.