diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-10 08:44:29 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-10 08:44:29 +0000 |
commit | 997ff23758884944f28a089eaa50ac7eb1c026c6 (patch) | |
tree | f99563ed31c2f6a8facc7160cccde602d39af79b /sample/cal.rb | |
parent | d148ffef297193fe5f6639a8bd8c9ee3d3374479 (diff) |
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/cal.rb')
-rw-r--r-- | sample/cal.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sample/cal.rb b/sample/cal.rb index a5f4b4db18..50865dbb8f 100644 --- a/sample/cal.rb +++ b/sample/cal.rb @@ -1,7 +1,7 @@ #! /usr/local/bin/ruby -# cal.rb (bsd compatible version): Written by Tadayoshi Funaba 1998 -# $Id: bsdcal.rb,v 1.2 1998/12/01 13:47:40 tadf Exp $ +# cal.rb (bsd compatible version): Written by Tadayoshi Funaba 1998, 1999 +# $Id: bsdcal.rb,v 1.3 1999/02/06 08:52:21 tadf Exp $ require 'date2' @@ -68,7 +68,7 @@ def zip(xs) yr end -while /^-(.*)$/no =~ $*[0] +while /^-([^-].*)$/no =~ $*[0] a = $1 if /^c(.+)?$/no =~ a then if $1 then @@ -90,6 +90,7 @@ while /^-(.*)$/no =~ $*[0] end $*.shift end +$*.shift if /^--/no =~ $*[0] usage if (gs = $tab[$cc]).nil? case $*.length when 0 |