diff --git a/Rakefile b/Rakefile index 64d5352..c4247c1 100644 --- a/Rakefile +++ b/Rakefile @@ -131,10 +131,9 @@ end SIZE_LIMIT = 4096 desc "Compare camping sizes to unabridged" task :size do - size = File.size("lib/camping-unabridged.rb") FileList["lib/camping*.rb"].each do |path| s = File.size(path) - puts "%21s : % 6d % 4d%" % [File.basename(path), s, (100 * s / size)] + puts "%21s : % 6d % 4d%" % [File.basename(path), s, (100 * s / SIZE_LIMIT)] end if File.size("lib/camping.rb") > SIZE_LIMIT STDERR.puts "ERROR: camping.rb is too big (> #{SIZE_LIMIT})" diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb index b049641..159425d 100644 --- a/lib/camping-unabridged.rb +++ b/lib/camping-unabridged.rb @@ -127,7 +127,7 @@ class H # => :macadamian # def method_missing(m,*a) - m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:raise(NoMethodError,"#{m}") + m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:super end alias_method :u, :regular_update end diff --git a/lib/camping.rb b/lib/camping.rb index 00e5926..7de8602 100644 --- a/lib/camping.rb +++ b/lib/camping.rb @@ -50,5 +50,5 @@ def method_missing m,c,*a;X.M;k=X.const_get(c).new(StringIO.new,H['HTTP_HOST', end;module Models;autoload:Base,'camping/db';def Y;self;end;end;class Mab< Markaby::Builder;include Views;def tag!*g,&b;h=g[-1];[:href,:action,:src].map{ |a|(h[a]=self/h[a])rescue 0};super end end;H=HashWithIndifferentAccess;class H -def method_missing m,*a;m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:raise( -NoMethodError,"#{m}")end;alias_method:u,:regular_update;end end +def method_missing m,*a;m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m]:super end +alias_method:u,:regular_update;end end