diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-10 08:53:35 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-10 08:53:35 +0900 |
| commit | 4695dfdcb6ce412d4aa4efb146c56c5c32a50e43 (patch) | |
| tree | f696c527202f32499073faf5fafa9476dc288f99 /mrbgems/mruby-io/mrblib | |
| parent | 55482063a7571dddfb5033d8d3f7541c177d4e2e (diff) | |
| download | mruby-4695dfdcb6ce412d4aa4efb146c56c5c32a50e43.tar.gz mruby-4695dfdcb6ce412d4aa4efb146c56c5c32a50e43.zip | |
Avoid using `mrb_funcall()` from `mruby-io` gem.
Diffstat (limited to 'mrbgems/mruby-io/mrblib')
| -rw-r--r-- | mrbgems/mruby-io/mrblib/file.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-io/mrblib/file.rb b/mrbgems/mruby-io/mrblib/file.rb index d3a4b1ec7..1854deb4e 100644 --- a/mrbgems/mruby-io/mrblib/file.rb +++ b/mrbgems/mruby-io/mrblib/file.rb @@ -11,6 +11,11 @@ class File < IO end end + def mtime + t = self._mtime + t && Time.at(t) + end + def self.join(*names) return "" if names.empty? |
