lib/rubydns/extensions/string-1.8.rb in rubydns-0.4.1 vs lib/rubydns/extensions/string-1.8.rb in rubydns-0.5.0

- old
+ new

@@ -16,26 +16,20 @@ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +require 'stringio' + class String def bytesize size end def byteslice(*args) self[*args] end - - def chunked(chunk_size = 255) - chunks = [] - - offset = 0 - while offset < bytesize - chunks << byteslice(offset, chunk_size) - offset += chunk_size - end - - return chunks - end +end + +module RubyDNS + BinaryStringIO = StringIO end