summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/mrblib
AgeCommit message (Collapse)Author
2019-10-21Remove `Kernel#getc`KOBAYASHI Shuji
`Kernel#getc` has been removed since Ruby 1.9 and is not defined in ISO.
2019-10-18Move methods of `Kernel` to `kernel.rb` from `io.rb` in `mruby-io` gemKOBAYASHI Shuji
2019-10-17Make `IO#each` family without block to return `Enumerator`KOBAYASHI Shuji
2019-10-11Remove unused exception classes in `mruby-io` gemKOBAYASHI Shuji
2019-09-16Add small fix over #4712Yukihiro "Matz" Matsumoto
2019-09-16Fix broken UTF-8 characters by `IO#getc`dearblue
Character (multi-byte UTF-8) is destroyed when character spanning `IO::BUF_SIZE` (4096 bytes) exist. - Prepare file: ```ruby File.open("sample", "wb") { |f| f << "●" * 1370 } ``` - Before patched: ```ruby File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a } # => ["●", "●", ..., "●", "\xe2", "\x97", "\x8f", "●", "●", "●", "●"] - After patched: ```ruby File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a } # => ["●", "●", ..., "●", "●", "●", "●", "●", "●"]
2019-09-16Small improvement for mruby-iodearblue
2019-09-16Fix `IO#pos`dearblue
2019-09-16Revert part of 8c90b5fc6dearblue
`IO#readline` and `IO#readchar` process in character units.
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-09-11Fixed `length` for IO should be in bytes, not in characters; #4696Yukihiro "Matz" Matsumoto
E.g. `io.read(5)` should read 5 byte string, not 5 characters.
2018-02-23Pass same mode parameter to `IO.sysopen` and `IO.open` in `IO.read`.Takeshi Watanabe
2017-12-07Add 'mrbgems/mruby-io/' from commit '3c8e1f94c44252c836f79a48bb17726da28e2756'Yukihiro "Matz" Matsumoto
git-subtree-dir: mrbgems/mruby-io git-subtree-mainline: 10ed730e4bd921cf4d8fe6f6d2e3cb3f0840f3b7 git-subtree-split: 3c8e1f94c44252c836f79a48bb17726da28e2756