Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Timestamp:
12/21/07 11:21:43 (9 months ago)
Author:
bitsweat
Message:

Multibyte: String#chars returns self for Ruby 1.9

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/multibyte/chars.rb

    r8459 r8460  
    120120      # +utf8_pragma+ checks if it can send this string to the handlers. It makes sure @string isn't nil and $KCODE is 
    121121      # set to 'UTF8'. 
    122       if RUBY_VERSION < '1.9' 
    123         def utf8_pragma? 
    124           !@string.nil? && ($KCODE == 'UTF8') 
    125         end 
    126       else 
    127         def utf8_pragma? 
    128           false 
    129         end 
     122      def utf8_pragma? 
     123        !@string.nil? && ($KCODE == 'UTF8') 
    130124      end 
    131125  end