From 57910ca5353e1feba1fb069a876b84a52f33d39f Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Thu, 1 Nov 2012 06:13:02 +0900 Subject: String#each_byte to use String#bytes; close #508 --- mrblib/string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) -- cgit v1.2.3