mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-io does not provide to_path method for implicit conversion
mruby does not use implicit type conversion by `to_xxx` (e.g. to_int, to_str, etc.)
This commit is contained in:
@@ -165,7 +165,7 @@ Add the line below to your build configuration.
|
||||
| File#flock | o | |
|
||||
| File#lstat | | |
|
||||
| File#mtime | | |
|
||||
| File#path, File#to_path | o | |
|
||||
| File#path | o | |
|
||||
| File#size | | |
|
||||
| File#truncate | | |
|
||||
|
||||
|
||||
@@ -199,8 +199,6 @@ class File < IO
|
||||
def self.path(filename)
|
||||
if filename.kind_of?(String)
|
||||
filename
|
||||
elsif filename.respond_to?(:to_path)
|
||||
filename.to_path
|
||||
else
|
||||
raise TypeError, "no implicit conversion of #{filename.class} into String"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user