Rails 3 beta4 destroyed my Tie Fighter
UPDATE: Turns out it wasn't just Rails3 beta4 that shot down my tie fighter operator. It was the combination of it and Ruby 1.9.1. Switching to 1.9.2 or 1.8.7 work fine. So now I get to wait on Rails to release 3 and Ruby to release 1.9.2 before I feel comfortable deploying anything.
END UPDATE
Railsconf brought rails beta4. Yay! or not. I get this immediately:
undefined method `<=>' for class `ActiveSupport::Multibyte::Chars'
My Tie Fighter Operator! No!
Here's the culprit in active_support/multibyte/chars.rb :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
if RUBY_VERSION >= "1.9" # Creates a new Chars instance by wrapping _string_. def initialize(string) @wrapped_string = string @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen? end undef <=> else def initialize(string) #:nodoc: @wrapped_string = string end end |
It looks like the undef-ing is acting as a method proxy to allow method_missing to pass the function on to String after setting the encoding to Utf-8. But it's not working.
I tracked the error down to calling value.mb_chars on a String and then it showed up again in another spot and I gave up.
I've got work to do after all. Back to rails3 beta3 for now.