ruby/sample
Thomas R. Koll f03dd4ee77
Refactor dir.rb sample (#6977) [ci skip]
* Refactor dir.rb sample

The original (1998) sample with a for-loop and use of case/when isn't what we'd write nowadays

* [DOC] Update sample/dir.rb [ci skip]

Do not leave a `Dir` opened.

* [DOC] Update sample/dir.rb [ci skip]

Fix ArgumentError.

---------

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-02-15 12:41:53 +09:00
..
drb Fix typo in README (#5925) 2022-05-20 14:45:46 -07:00
getoptlong [ruby/getoptlong] ruby/ruby used sample, not examples 2022-05-09 07:13:55 +09:00
logger
openssl
optparse
pty
rdoc/markup
ripper
trick2013
trick2015 Remove obsolete Fixnum and Bignum 2021-12-28 18:35:03 +09:00
trick2018 Sync TRICK 2018 (02-mame) 2022-11-05 23:18:32 +09:00
trick2022 sample/trick2022/03-mame/entry.rb: remove trailing spaces 2022-12-24 03:19:45 +09:00
README
benchmark.rb
biorhythm.rb
cal.rb
cbreak.rb
cgi-session-pstore.rb
clnt.rb
coverage.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
delegate.rb
dir.rb Refactor dir.rb sample (#6977) [ci skip] 2023-02-15 12:41:53 +09:00
dualstack-fetch.rb
dualstack-httpd.rb
eval.rb
export.rb
exyacc.rb
fact.rb
fib.awk
fib.pl
fib.py
fib.rb
fib.scm
from.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
fullpath.rb
iseq_loader.rb
less.rb
list.rb
list2.rb
list3.rb
mine.rb Use io/console to avoid stty error [ci skip] 2022-12-05 19:23:16 +09:00
mkproto.rb
mpart.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
net-imap.rb
observ.rb
occur.pl
occur.rb
open3.rb
philos.rb
pi.rb
pstore.rb
rcs.awk
rcs.dat
rcs.rb
rinda-ring.rb
sieve.rb
simple-bench.rb
svr.rb
tempfile.rb
test.rb
time.rb
timeout.rb
trojan.rb
tsvr.rb
uumerge.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
weakref.rb

README

README		this file
biorhythm.rb	biorhythm calculator
cal.rb		cal(1) clone
cbreak.rb	no echo done by ioctl
clnt.rb		socket client
coverage.rb	simple test code coverage tool
dir.rb		directory access
dualstack-fetch.rb	IPv6 demo
dualstack-httpd.rb	IPv6 demo
eval.rb		simple evaluator
export.rb	method access example
exyacc.rb	extrace BNF from yacc file
fact.rb		factorial calculator
fib.awk		Fibonacci number (AWK)
fib.pl		Fibonacci number (Perl)
fib.py		Fibonacci number (Python)
fib.rb		Fibonacci number (Ruby)
fib.scm		Fibonacci number (Scheme)
from.rb		scan mail spool
fullpath.rb	convert ls -lR to fullpath format
less.rb		front end for less
list.rb		stupid object sample
list2.rb	stupid object sample
list3.rb	stupid object sample
mine.rb		simple mine sweeper
mkproto.rb	extract prototype from C
mpart.rb	split file int multi part
observ.rb	observer design pattern sample
occur.pl	count word occurrence (Perl)
occur.rb	count word occurrence (Ruby)
philos.rb	famous dining philosophers
pi.rb		calculate PI
rcs.awk		random character stereogram (AWK)
rcs.rb		random character stereogram (Ruby)
rcs.dat		data for random character stereogram
sieve.rb	sieve of Eratosthenes
svr.rb		socket server
test.rb		test suite used by `make test'
time.rb		/usr/bin/time clone
timeout.rb	timeout test
trojan.rb	simple tool to find file that may be trojan horse.
tsvr.rb		socket server using thread
uumerge.rb	merge files and uudecode them