diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-05-29 17:01:44 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-05-29 17:01:52 +0900 |
| commit | b05d736b49a6d3a99b7f75c74ffd9b6613c453d3 (patch) | |
| tree | cae1cfe223f130dffe344cc533e3873f52802aa8 /mrblib/string.rb | |
| parent | 13a2cc3e5d27c33db7f4cf06ece4c44a79c79c53 (diff) | |
| download | mruby-b05d736b49a6d3a99b7f75c74ffd9b6613c453d3.tar.gz mruby-b05d736b49a6d3a99b7f75c74ffd9b6613c453d3.zip | |
update mrblib/*.rb files to conform (some of) Rubocop checks
Diffstat (limited to 'mrblib/string.rb')
| -rw-r--r-- | mrblib/string.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrblib/string.rb b/mrblib/string.rb index 1d9ea9e6a..90aad5d32 100644 --- a/mrblib/string.rb +++ b/mrblib/string.rb @@ -12,7 +12,7 @@ class String def each_line(&block) # expect that str.index accepts an Integer for 1st argument as a byte data offset = 0 - while(pos = self.index(0x0a, offset)) + while pos = self.index(0x0a, offset) block.call(self[offset, pos + 1 - offset]) offset = pos + 1 end @@ -106,7 +106,7 @@ class String # +self+. def each_char(&block) pos = 0 - while(pos < self.size) + while pos < self.size block.call(self[pos]) pos += 1 end @@ -118,7 +118,7 @@ class String def each_byte(&block) bytes = self.bytes pos = 0 - while(pos < bytes.size) + while pos < bytes.size block.call(bytes[pos]) pos += 1 end |
