summaryrefslogtreecommitdiffhomepage
path: root/mrblib/string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/string.rb')
-rw-r--r--mrblib/string.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/string.rb b/mrblib/string.rb
index 5765cff9b..7209f03d2 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("\n", offset)
block.call(self[offset, pos + 1 - offset])
offset = pos + 1
end