lib/characteristics/ascii.rb in characteristics-0.5.2 vs lib/characteristics/ascii.rb in characteristics-0.6.0

- old
+ new

@@ -16,10 +16,14 @@ def initialize(char) super @ord = char.ord if @is_valid end + def valid? + @is_valid && !(@encoding_name != "US-ASCII" && @ord >= 0x80) + end + def unicode? false end def assigned? @@ -42,9 +46,13 @@ false end def blank? @is_valid && ( BLANKS.include?(@ord) || SEPARATORS.include?(@ord) ) + end + + def separator? + SEPARATORS.include?(@ord) end def format? false end \ No newline at end of file