Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9632: wrong_include.diff

File wrong_include.diff, 1.6 kB (added by julik, 1 year ago)
  • test/multibyte_conformance.rb

    old new  
    122122end 
    123123 
    124124begin 
    125   require_library_or_gem('utf8proc_native') 
    126   require 'active_record/multibyte/handlers/utf8_handler_proc' 
     125  require_library_or_gem('utf8proc') 
     126  require 'active_support/multibyte/handlers/utf8_handler_proc' 
     127  puts "Also testing the utf8 backend" 
    127128  class ConformanceTestProc < Test::Unit::TestCase 
    128129    include ConformanceTest 
    129130    def setup 
  • lib/active_support/multibyte/handlers/utf8_handler_proc.rb

    old new  
    2727      utf8map(str, :casefold) 
    2828    end 
    2929     
     30    def upcase(str) #:nodoc:c 
     31      utf8map(str, :casefold) 
     32    end 
     33     
    3034    protected 
    3135     
    3236    def utf8map(str, *option_array) #:nodoc: 
  • lib/active_support/multibyte/chars.rb

    old new  
    127127 
    128128# When we can load the utf8proc library, override normalization with the faster methods 
    129129begin 
    130   require 'utf8proc_native
     130  require_library_or_gem 'utf8proc
    131131  require 'active_support/multibyte/handlers/utf8_handler_proc' 
    132132  ActiveSupport::Multibyte::Chars.handler = ActiveSupport::Multibyte::Handlers::UTF8HandlerProc 
    133133rescue LoadError