mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* sample/README: removed obsoleted files: dbmtest.rb,
getopts.test, mrshtest.rb, regx.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
29ba327bd1
commit
3a067a5278
6 changed files with 5 additions and 90 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Dec 25 11:48:35 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* sample/README: removed obsoleted files: dbmtest.rb,
|
||||
getopts.test, mrshtest.rb, regx.rb.
|
||||
|
||||
Tue Dec 25 11:45:34 2007 James Edward Gray II <jeg2@ruby-lang.org>
|
||||
|
||||
* lib/csv.rb: Import the FasterCSV source as the new CSV class.
|
||||
|
|
|
@ -3,7 +3,6 @@ biorhythm.rb biorhythm calculator
|
|||
cal.rb cal(1) clone
|
||||
cbreak.rb no echo done by ioctl
|
||||
clnt.rb socket client
|
||||
dbmtest.rb test for dbm
|
||||
dir.rb directory access
|
||||
dualstack-fetch.rb IPv6 demo
|
||||
dualstack-httpd.rb IPv6 demo
|
||||
|
@ -20,7 +19,6 @@ fib.scm Fibonacci number (Scheme)
|
|||
freq.rb count word occurrence
|
||||
from.rb scan mail spool
|
||||
fullpath.rb convert ls -lR to fullpath format
|
||||
getopts.test test fot getopt.rb
|
||||
goodfriday.rb print various christian calendar event.
|
||||
io.rb io test
|
||||
irb.rb interactive ruby
|
||||
|
@ -31,7 +29,6 @@ list3.rb stupid object sample
|
|||
mine.rb simple mine sweeper
|
||||
mkproto.rb extract prototype from C
|
||||
mpart.rb split file int multi part
|
||||
mrshtest.rb test marshal
|
||||
observ.rb observer design pattern sample
|
||||
occur.pl count word occurrence (Perl)
|
||||
occur.rb count word occurrence (Ruby)
|
||||
|
@ -42,7 +39,6 @@ rcs.awk random character stereogram (AWK)
|
|||
rcs.rb random character stereogram (Ruby)
|
||||
rcs.dat data for random character stereogram
|
||||
rd2html.rb rd (Ruby Document) to HTML translator
|
||||
regx.rb regular expression tester
|
||||
sieve.rb sieve of Eratosthenes
|
||||
svr.rb socket server
|
||||
test.rb test suite used by `make test'
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
# ruby dbm acess
|
||||
require "dbm"
|
||||
|
||||
d = DBM.open("test")
|
||||
keys = d.keys
|
||||
if keys.length > 0 then
|
||||
for k in keys; print k, "\n"; end
|
||||
for v in d.values; print v, "\n"; end
|
||||
else
|
||||
d['foobar'] = 'FB'
|
||||
d['baz'] = 'BZ'
|
||||
d['quux'] = 'QX'
|
||||
end
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
#! /usr/local/bin/ruby
|
||||
|
||||
load("parsearg.rb")
|
||||
|
||||
def usage()
|
||||
printf "Usage:\n"
|
||||
printf "%s -d [-x x] [-y y] [--geometry geom] [--version] [string ...]\n", $0
|
||||
end
|
||||
|
||||
$USAGE = 'usage'
|
||||
parseArgs(0, "d&(x|y)", "dfg", "x:", "y:", "geometry:800x600", "version")
|
||||
if ($OPT_d)
|
||||
if $OPT_version
|
||||
printf "version 1.0\n"
|
||||
end
|
||||
if ($OPT_x)
|
||||
printf("x = %d\n", $OPT_x.to_i)
|
||||
end
|
||||
if ($OPT_y)
|
||||
printf("y = %d\n", $OPT_y.to_i)
|
||||
end
|
||||
if ($OPT_geometry)
|
||||
printf("geometry = %s\n", $OPT_geometry)
|
||||
end
|
||||
if $OPT_f
|
||||
printf "f = TRUE\n"
|
||||
end
|
||||
if $OPT_g
|
||||
printf "g = TRUE\n"
|
||||
end
|
||||
end
|
||||
|
||||
while (ARGV.length != 0)
|
||||
print "other = ", ARGV[0], "\n"
|
||||
ARGV.shift
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
include Marshal
|
||||
a = 25.6;
|
||||
pt = Struct.new('Point', :x,:y);
|
||||
x = pt.new(10, 10)
|
||||
y = pt.new(20, 20)
|
||||
rt = Struct.new('Rectangle', :origin,:corner);
|
||||
z = rt.new(x, y)
|
||||
c = Object.new
|
||||
s = [a, x, z, c, c, "fff"];
|
||||
p s
|
||||
d = dump(s);
|
||||
p d
|
||||
p load(d)
|
|
@ -1,23 +0,0 @@
|
|||
st = "\033[7m"
|
||||
en = "\033[m"
|
||||
#st = "<<"
|
||||
#en = ">>"
|
||||
|
||||
while true
|
||||
print "str> "
|
||||
STDOUT.flush
|
||||
input = gets
|
||||
break if not input
|
||||
if input != ""
|
||||
str = input
|
||||
str.chop!
|
||||
end
|
||||
print "pat> "
|
||||
STDOUT.flush
|
||||
re = gets
|
||||
break if not re
|
||||
re.chop!
|
||||
str.gsub! re, "#{st}\\&#{en}"
|
||||
print str, "\n"
|
||||
end
|
||||
print "\n"
|
Loading…
Add table
Reference in a new issue