summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mrblib/string.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/string.rb b/mrblib/string.rb
index d09b787da..0b995f9ca 100644
--- a/mrblib/string.rb
+++ b/mrblib/string.rb
@@ -118,7 +118,7 @@ class String
##
# Call the given block for each byte of +self+.
def each_byte(&block)
- bytes = self.unpack("C*")
+ bytes = self.bytes
pos = 0
while(pos < bytes.size)
block.call(bytes[pos])