summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/src
AgeCommit message (Collapse)Author
2020-03-08Remove unnecessary 'stdio.h'; ref #4947dearblue
'stdio.h' is included in 'mruby.h' ('mrbconf.h'). However, keep 'stdio.h' used by mruby-test.
2020-03-08Small refactoring on #4952Yukihiro "Matz" Matsumoto
Fix the argument of `mrb_file_is_absolute_path()`.
2020-03-08Traditional, UNC, and Device Is Absolute?Reckordp
2020-03-08Commit from remoteReckordp
2020-03-08Evaluate all type pathReckordp
2020-03-07Small refactoring on #4939Yukihiro "Matz" Matsumoto
2020-03-07Use in-house macro `ISALPHA` instead of `isalpha`; ref #4950Yukihiro "Matz" Matsumoto
2020-03-07Merge branch 'io-pread-pwrite' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-io-pread-pwrite
2020-03-07Add absolute path for UNCReckordp
2020-03-07Fix typoReckordp
2020-03-07Merge the update suggested by @mattn; ref #4950Yukihiro "Matz" Matsumoto
2020-03-07Merge pull request #4950 from Reckordp/masterYukihiro "Matz" Matsumoto
Absolute path for windows
2020-03-07Absolute path for windowsReckordp
2020-02-05Merge pull request #4941 from davidsiaw/mac-compatYukihiro "Matz" Matsumoto
Include time.h for ios
2020-02-02Implement `IO#pread` and `IO#pwrite`dearblue
It is available by default in environments where `__unix__` is defined. Other environments are enabled by defining `MRB_WITH_IO_PREAD_PWRITE` (requires an implementation of `pread()` and `pwrite()` functions). In any case, you can disable it by defining `MRB_WITHOUT_IO_PREAD_PWRITE`.
2020-01-31Add explicit casting in `file.c` to silence warnings.Yukihiro "Matz" Matsumoto
2020-01-31Avoid casting warning from `mrb_int` to `int` in `io.c`.Yukihiro "Matz" Matsumoto
2020-01-28Merge pull request #4873 from dearblue/open-flagsYukihiro "Matz" Matsumoto
Support bit flags for `IO.open`
2020-01-28include time.h for iosDavid Siaw
2020-01-06Avoid Boxing/Unboxing of file descriptors; ref #4872Yukihiro "Matz" Matsumoto
2020-01-06Merge branch 'file-size-truncate' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-file-size-truncate
2020-01-01Rename `mrb_num_args_error` to `mrb_argnum_error`; ref #4863Yukihiro "Matz" Matsumoto
2020-01-01Merge pull request #4863 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-mrb_num_args_error-for-wrong-number-of-arguments-error Add `mrb_num_args_error()` for "wrong number of arguments" error
2019-12-14Support bit flags for `IO.open`dearblue
Note that this bit flags are not compatible with the native flags defined in `#include <fcntl.h>`.
2019-12-14Implement `File#size` and `File#truncate`dearblue
2019-12-14Remove unnessesary branchesdearblue
2019-12-12Add `mrb_num_args_error()` for "wrong number of arguments" errorKOBAYASHI Shuji
To unify the style of messages.
2019-11-09Fix argument specs to `IO`KOBAYASHI Shuji
2019-11-01Fix argument specs to `File`KOBAYASHI Shuji
2019-10-23Remove unnecessary `mrb_funcall()`.Yukihiro "Matz" Matsumoto
2019-10-23Remove unnecessary `mrb_string_p()` check.Yukihiro "Matz" Matsumoto
2019-10-10Silence double free warnings by `mrb_local_free()`.Yukihiro "Matz" Matsumoto
The warnings were detected by cppcheck.
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-09-14Replace `String#byteslice` by custom `IO._bufread`.Yukihiro "Matz" Matsumoto
`byteslice` creates 2 string objects. `_bufread` creates one, and modifies the original buffer string, that is more efficient.
2019-09-12Remove `$/` from mruby implementation.Yukihiro "Matz" Matsumoto
1. `$/` and other Perl-ish global variables are not defined in ISO. 2. The current Ruby policy do not encourage those variables. 3. Those variables has global effect and can cause troubles.
2019-08-07Reorganize `mrb_string_value_cstr` and related functions.Yukihiro "Matz" Matsumoto
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete `mrb_string_cstr`: new function to retrieve NULL terminated C string `RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
2019-08-06Removed an unused local variable; ref #4615Yukihiro "Matz" Matsumoto
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back.
2019-06-07Replace obsolete macrosdearblue
2019-05-15Fix typo in `mrbgems/mruby-io/src/file_test.c` [ci skip]KOBAYASHI Shuji
2019-05-10Move `mrb_gc_arena_restore` to inside the loop in `mrb_file_s_chmod`KOBAYASHI Shuji
2019-05-10Raise `TypeError` if the argument type is unsupported in `mrb_stat0`KOBAYASHI Shuji
2019-05-06Avoid using `mrb_str_to_cstr` if possibleKOBAYASHI Shuji
Because it always allocate new string. Replace with the followings: - Use `RSRING_PTR` if string is guaranteed to be null-terminated. - Use `mrb_string_value_cstr` or `mrb_get_args("z")` if return value isn't modified.
2018-12-23Suppress TARGET_OS_IPHONE warnsdearblue
2018-11-19Remove implicit conversion using `to_str` method; fix #3854Yukihiro "Matz" Matsumoto
We have added internal convenience method `__to_str` which does string type check. The issue #3854 was fixed but fundamental flaw of lack of stack depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA` for workaround.
2018-09-15Exclude pipe and exec on iOS/tvOSTom Black
Use of `execl()` is prohibited on these platforms
2018-09-16fixup! Add support for iOS platforms that does not support `fork`; fix #4113Yukihiro "Matz" Matsumoto
2018-09-16Add support for iOS platforms that does not support `fork`; fix #4113Yukihiro "Matz" Matsumoto
2018-08-13Try to fix a fragile `File#mtime` test.Yukihiro "Matz" Matsumoto
2018-07-02Support MRB_WITHOUT_FLOAT to mruby-ioYusuke Endoh