tenderlove/csspool — pull request #45 by JasonBarnabe (2013-02-24 20:57:40+00:00)
Title: Support URL(http://example.com)

http://www.w3.org/TR/CSS21/syndata.html#characters

"All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS. For example, the case-sensitivity of values of the HTML attributes "id" and "class", of font names, and of URIs lies outside the scope of this specification. Note in particular that element names are case-insensitive in HTML, but case-sensitive in XML."

Meaning, while URLs are case-sensitive, the URL function is not, so saying

```css
background: URL(http://example.com);
```

is valid. Currently csspool throws this:

```
NoMethodError: undefined method `[]' for nil:NilClass
parser.y:409:in `interpret_uri'
parser.y:348:in `_reduce_116'
parser.y:401:in `_racc_do_parse_c'
/usr/local/lib/ruby/1.8/racc/parser.rb:99:in `catch'
/usr/local/lib/ruby/1.8/racc/parser.rb:99:in `_racc_do_parse_c'
/usr/local/lib/ruby/1.8/racc/parser.rb:99:in `__send__'
/usr/local/lib/ruby/1.8/racc/parser.rb:99:in `do_parse'
./lib/csspool/css/tokenizer.rb:30:in `scan_str'
./lib/csspool/sac/parser.rb:11:in `parse'
./lib/csspool/css/document.rb:17:in `parse'
./lib/csspool.rb:19:in `CSS'
```