summaryrefslogtreecommitdiffstats
path: root/sample/biorhythm.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 07:02:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 07:02:23 +0000
commit90b8654fcd3acfaab6339f3d039e12410595e3c8 (patch)
treedd8a8256032a8c6ef07ac3ae8c6464c11282f104 /sample/biorhythm.rb
parente0e6213157a34e1cbbd134196990b288fa0a6fff (diff)
downloadruby-90b8654fcd3acfaab6339f3d039e12410595e3c8.tar.gz
ruby-90b8654fcd3acfaab6339f3d039e12410595e3c8.tar.xz
ruby-90b8654fcd3acfaab6339f3d039e12410595e3c8.zip
* eval.c (rb_eval): ruby_frame->last_func may be null, if it's
called outside of a method. * parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS. * parse.y (arg): unnecessary negative tPOW treatment. * parse.y (tokadd_escape): wrong backslash escapement. * parse.y (stmt,arg): too much void value check. * parse.y (stmt,arg): need to check void value on rules which does not use node_assign(). * ext/socket/socket.c (ipaddr): need not to taint hostnames. * range.c (range_include): should be based on "<=>", whereas member? still is based on "each". * range.c (range_min,range_max): redefine methods based on "<=>". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/biorhythm.rb')
-rw-r--r--sample/biorhythm.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/biorhythm.rb b/sample/biorhythm.rb
index 8fc08c691..1c6d6fbad 100644
--- a/sample/biorhythm.rb
+++ b/sample/biorhythm.rb
@@ -51,7 +51,7 @@ end
def getPosition(z)
pi = Math::PI
- z = Integer(z)
+ z = Integer(z)
phys = (50.0 * (1.0 + sin((z / 23.0 - (z / 23)) * 360.0 * pi / 180.0))).to_i
emot = (50.0 * (1.0 + sin((z / 28.0 - (z / 28)) * 360.0 * pi / 180.0))).to_i
geist =(50.0 * (1.0 + sin((z / 33.0 - (z / 33)) * 360.0 * pi / 180.0))).to_i
@@ -59,7 +59,7 @@ def getPosition(z)
end
def parsedate(s)
- ParseDate::parsedate(s).indexes(0, 1, 2)
+ ParseDate::parsedate(s).select(0, 1, 2)
end
def name_of_week(date)