# File lib/test/unit/color.rb, line 11 def parse_256_color(string) case string when /\A([0-5])([0-5])([0-5])\z/ red, green, blue = $1, $2, $3 red.to_i * 36 + green.to_i * 6 + blue.to_i + 16 else message = "must be 'RGB' format and R, G and B " + "are in 0-5: #{string.inspect}" raise ParseError, message end end