Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Ruby 1.9 compat: script encoding should be explicitly defined by magic comment

#1325

Since Ruby 1.9, script encoding should be explicitly defined by magic comment when the script source includes multibyte characters. Otherwise, the script will be parsed as a US-ASCII file.

see http://redmine.ruby-lang.org/wik...

This patch fixes failure in rails command.

Reported by Akira Matsuda · November 4th, 2008 @ 09:49 AM

State: committed
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Akira Matsuda
    Akira Matsuda

    Ruby 1.9.1 preview 2 + Edge Rails still fails in "rails" command with the following error, and this patch is still effective to fix the problem. Any reason to put off the commit?

    
    % ruby19 ~/src/rails/railties/bin/rails test_app
    $RAILS_DIR/activesupport/lib/active_support/core_ext/integer/inflections.rb:1:in `require':
    $RAILS_DIR/activesupport/lib/active_support/inflector.rb:286: invalid multibyte char (US-ASCII) (SyntaxError)
    $RAILS_DIR/activesupport/lib/active_support/inflector.rb:286: invalid multibyte char (US-ASCII)
    $RAILS_DIR/activesupport/lib/active_support/inflector.rb:286: syntax error, unexpected $end, expecting ')'
        elsif "foo" != Inflector.transliterate("föö")
                                                   ^
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext/integer/inflections.rb:1:in `<top (required)>'
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext/integer.rb:2:in `require'
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext/integer.rb:2:in `<top (required)>'
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext.rb:3:in `require'
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext.rb:3:in `block in <top (required)>'
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext.rb:1:in `each'
    	from $RAILS_DIR/activesupport/lib/active_support/core_ext.rb:1:in `<top (required)>'
    	from $RAILS_DIR/activesupport/lib/active_support.rb:55:in `require'
    	from $RAILS_DIR/activesupport/lib/active_support.rb:55:in `<top (required)>'
    	from $RAILS_DIR/railties/lib/rails_generator.rb:28:in `require'
    	from $RAILS_DIR/railties/lib/rails_generator.rb:28:in `<top (required)>'
    	from $RAILS_DIR/railties/bin/rails:13:in `require'
    	from $RAILS_DIR/railties/bin/rails:13:in `<main>'
    

    December 2nd, 2008 @ 04:39 PM

  2. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to committed

    It was committed on November 7: b5291ed0f1e956cc98e1bfc8e50ee9fb4f6a661b

    December 3rd, 2008 @ 04:04 PM

  3. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 9th, 2010 @ 10:02 PM

  4. Ryan Bigg
    Ryan Bigg

    Automatic cleanup of spam.

    October 21st, 2010 @ 03:36 AM

  5. Jeff Kreeftmeijer
  6. bingbing