word length fixes

This commit is contained in:
Torsten Ruger
2015-06-06 18:46:53 +02:00
parent 1c29fcfd43
commit 13ab029cc5
5 changed files with 12 additions and 12 deletions

View File

@ -16,7 +16,6 @@ module Padding
def padding_for length
pad = padded(length) - length - 8 # for header, type and layout
puts "padded #{length.to_s(16)} with #{pad.to_s(16)} stream pos #{@stream.length.to_s(16)}"
pad
end
end

View File

@ -99,7 +99,7 @@ module Parfait
class Object
include FakeMem
include Padding
# these internal functions are _really_ internal
# they respresent the smallest code needed to build larger functionality
# but should _never_ be used outside parfait. in fact that should be impossible
@ -174,9 +174,6 @@ module Parfait
end
class Word
def word_length
padded(1 + length())
end
def == other
return false unless other.is_a?(String) or other.is_a?(Word)