Changeset 29889 for lang/ruby/scaflute

Show
Ignore:
Timestamp:
02/11/09 04:50:40 (5 years ago)
Author:
drry
Message:
  • fixed the regex.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/scaflute/scaflute.rb

    r29737 r29889  
    7575  def camelize() 
    7676    str = self.downcase() 
    77     str = str.gsub(/_\w/) do |w| 
    78       w.upcase() 
     77    str = str.gsub(/_+([a-z]?)/) do 
     78      $1.upcase() 
    7979    end 
    80     str = str.gsub(/_/, '') 
    8180    return str 
    8281  end