summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/src/file.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-05-17 15:07:05 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-05-17 15:07:05 +0900
commit5eebbd7df23421235a2d6289784e18d572c4b18a (patch)
tree1cdb8c607f175d162ca3e316a0147ee36b2fc015 /mrbgems/mruby-io/src/file.c
parentea7f1953c3886d7597eaed21c84fdba209ee6d9b (diff)
downloadmruby-5eebbd7df23421235a2d6289784e18d572c4b18a.tar.gz
mruby-5eebbd7df23421235a2d6289784e18d572c4b18a.zip
Global renaming regarding `integer` and `float`.
Consistent number conversion function names: * `mrb_value` to immediate (C) value * `mrb_int()` -> `mrb_as_int()` * `mrb_to_flo()` -> `mrb_as_float()` * `mrb_value` to `mrb_value` (converted) * `mrb_to_int()' * `mrb_Integer()` - removed * `mrb_Float()` -> `mrb_to_float` Consistent function name (avoid `_flo` suffix): * `mrb_div_flo()` -> `mrb_div_float`
Diffstat (limited to 'mrbgems/mruby-io/src/file.c')
-rw-r--r--mrbgems/mruby-io/src/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c
index 03a6a070d..b9e1eca03 100644
--- a/mrbgems/mruby-io/src/file.c
+++ b/mrbgems/mruby-io/src/file.c
@@ -497,7 +497,7 @@ mrb_file_truncate(mrb_state *mrb, mrb_value self)
mrb_value lenv = mrb_get_arg1(mrb);
fd = mrb_io_fileno(mrb, self);
- length = mrb_int(mrb, lenv);
+ length = mrb_as_int(mrb, lenv);
if (mrb_ftruncate(fd, length) != 0) {
mrb_raise(mrb, E_IO_ERROR, "ftruncate failed");
}