aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plum/binary_string.rb
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-08-05 22:29:24 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-08-05 22:29:24 +0900
commit06608a0cab5fd7f6e319b4954e2bf8d52f37ae72 (patch)
treef2003e0cb0bdbb18179442a269a7727a0bc306a2 /lib/plum/binary_string.rb
parent0474e6ba3a171ac1ba46e8499b12e6b36a56d326 (diff)
downloadplum-06608a0cab5fd7f6e319b4954e2bf8d52f37ae72.tar.gz
binary_string: rename BinaryString#shift to #byteshift
Diffstat (limited to 'lib/plum/binary_string.rb')
-rw-r--r--lib/plum/binary_string.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/plum/binary_string.rb b/lib/plum/binary_string.rb
index 99fe2bb..2d3ed76 100644
--- a/lib/plum/binary_string.rb
+++ b/lib/plum/binary_string.rb
@@ -50,12 +50,9 @@ module Plum
# Takes from beginning and cut specified *octets* from this String.
# @param count [Integer] The amount.
- def shift(count)
- enc = self.encoding
+ def byteshift(count)
force_encoding(Encoding::BINARY)
- out = slice!(0, count)
- force_encoding(enc)
- out
+ slice!(0, count)
end
end
end