Changeset 212

Show
Ignore:
Timestamp:
09/23/2007 17:17:58 (15 months ago)
Author:
zimbatm
Message:

* Gained 22 octets, by replacing raise NoMethodError?... by "super"
* Fixed rake size calulations

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/Rakefile

    r203 r212  
    132132desc "Compare camping sizes to unabridged" 
    133133task :size do 
    134   size = File.size("lib/camping-unabridged.rb") 
    135134  FileList["lib/camping*.rb"].each do |path| 
    136135    s = File.size(path) 
    137     puts "%21s : % 6d % 4d%" % [File.basename(path), s, (100 * s / size)] 
     136    puts "%21s : % 6d % 4d%" % [File.basename(path), s, (100 * s / SIZE_LIMIT)] 
    138137  end 
    139138  if File.size("lib/camping.rb") > SIZE_LIMIT 
  • trunk/lib/camping-unabridged.rb

    r211 r212  
    128128    # 
    129129    def method_missing(m,*a) 
    130         m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:raise(NoMethodError,"#{m}") 
     130        m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:super 
    131131    end 
    132132    alias_method :u, :regular_update 
  • trunk/lib/camping.rb

    r211 r212  
    5151Markaby::Builder;include Views;def tag!*g,&b;h=g[-1];[:href,:action,:src].map{ 
    5252|a|(h[a]=self/h[a])rescue 0};super end end;H=HashWithIndifferentAccess;class H 
    53 def method_missing m,*a;m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:raise( 
    54 NoMethodError,"#{m}")end;alias_method:u,:regular_update;end end 
     53def method_missing m,*a;m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:super end 
     54alias_method:u,:regular_update;end end