This is a limitation (incompatible feature) on 1.9.

Workaround is to re-defining operators:

class Fixnum
   alias orig_plus +
   def +(o)
     orig_plus(o)
   end
end

Dave Thomas wrote:
> Issue #161 has been reported by Dave Thomas.
> 
> ----------------------------------------
> Bug #161: Profile library seems broken in 1.9 15427cat t.rv
> http://redmine.ruby-lang.org/issues/show/161
> 
> Author: Dave Thomas
> Status: Open
> Priority: Normal
> Assigned to: 
> Category: 
> Target version: 
> 
> 
> dave[RUBY3/Book 18:11:11*] cat t.rb
>     require 'profile'
>     def ackerman(m, n)
>       if m == 0 then  n+1
>       elsif n == 0 and m > 0 then ackerman(m-1, 1)
>       else ackerman(m-1, ackerman(m, n-1))
>       end
>     end
>     ackerman(3, 3)
> 
> With 1.8:
> 
>  dave[RUBY3/Book 18:11:36*] /usr/bin/ruby -v t.rb
>  ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
>   %   cumulative   self              self     total
>  time   seconds   seconds    calls  ms/call  ms/call  name
>  72.97     0.27      0.27     2432     0.11     4.65  Object#ackerman
>  13.51     0.32      0.05     3676     0.01     0.01  Fixnum#==
>  10.81     0.36      0.04     2431     0.02     0.02  Fixnum#-
>   2.70     0.37      0.01     1188     0.01     0.01  Fixnum#+
>   0.00     0.37      0.00        1     0.00     0.00  Module#method_added
>   0.00     0.37      0.00       57     0.00     0.00  Fixnum#>
>   0.00     0.37      0.00        1     0.00   370.00  #toplevel
>  
> With 1.9:
> 
>  dave[RUBY3/Book 18:11:40*] ruby -v t.rb         
>  ruby 1.9.0 (2008-06-16 revision 15427) [i686-darwin9.3.0]
>   %   cumulative   self              self     total
>  time   seconds   seconds    calls  ms/call  ms/call  name
>   0.00     0.00      0.00        1     0.00     0.00  Module#method_added
>   0.00     0.01      0.00        1     0.00    10.00  #toplevel
> 
> 
> ----------------------------------------
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://redmine.ruby-lang.org/my/account
> 


-- 
// SASADA Koichi at atdot dot net