Watson1978
9/15/2012 - 2:02 PM

app.rb

require 'mobiruby'

#require 'hello'
#require 'samegame_app'

def fib(n)
    return 0 if n <= 0
    return 1 if n == 1
    return fib(n - 2) + fib(n - 1)
end


s = Cocoa::NSDate._date
fib(37)
e = Cocoa::NSDate._date
puts "time = " + e._timeIntervalSinceDate(s).to_f.to_s
#RubyMotion

def fib(n)
  return 0 if n <= 0
  return 1 if n == 1
  return fib(n - 2) + fib(n - 1)
end

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)

    s = NSDate.date
    fib(37)
    e = NSDate.date
    puts "time = " + e.timeIntervalSinceDate(s).to_f.to_s

    true
  end
end