Closed kayleg closed 14 years ago
String#gsub
takes a string as both arguments. In what case does it help that it is a regexp and not a string?
There is no case that I know of, just that there was a server error reporting that a regexp was expected when running on Ruby 1.9.1, until the above changes were made.
Can you write a test and possibly a fix? I'm unable to reproduce it.
tests pass on 1.9.1, can be closed afaik
Goodie :)
Ruby looking for a regexp in the gsub method
At line 126:
destination_dir = source.dirname.to_s.gsub(source_path, cache_path) destination = File.join(destination_dir, source.basename.to_s.gsub('.less', '.css').gsub('.lss', '.css'))
needs to be
destination_dir = source.dirname.to_s.gsub(/#{source_path}/, cache_path) destination = File.join(destination_dir, source.basename.to_s.gsub(/.less/, '.css').gsub(/.lss/, '.css'))