吉田@TPJです.
sample の下の biorythm.rb ですが,
0.95c で 実行すると以下のように core dump してしまいます.
------------------------------------------------------------------------
% ../ruby ../sample/biorhythm.rb
Biorhythm (c) 1987-1994 V3.0
Birthday (YYYYMMDD) : 19680513
Date [<RETURN> for Systemdate] (YYYYMMDD) :
Values for today or Graph (v/g) [default g] :
Graph for how many days [default 10] :
Floating exception (core dumped)
% dbx ../ruby core
Reading symbolic information for ../ruby
core file header read successfully
Reading symbolic information for rtld /usr/lib/ld.so.1
Reading symbolic information for /usr/lib/libm.so.1
Reading symbolic information for /usr/lib/libdl.so.1
Reading symbolic information for /usr/lib/libc.so.1
program terminated by signal FPE (integer divide by zero)
(dbx) w
=>[1] .div(0x0, 0x0, 0x9, 0x0, 0x0, 0x0), at 0xdf6d3e9c
[2] fix_mul(0x1, 0x1f, 0x2c478, 0x2, 0x0, 0x0), at 0x2c4e4
[3] rb_call(0x1, 0x1, 0x2a, 0x1, 0xdfffe5c0, 0x0), at 0x20440
[4] rb_eval(0x1, 0x38, 0xdfffed50, 0x2, 0x0, 0x0), at 0x1dc10
[5] rb_eval(0x982d0, 0x4, 0xffffffff, 0x0, 0x0, 0x8fa69), at 0x1e060
[6] rb_eval(0x982b8, 0x1d0, 0xffffffff, 0x0, 0xf99, 0x0), at 0x1cec8
[7] rb_call(0x98648, 0x0, 0x1670, 0x3, 0xdfffef20, 0x1), at 0x20a80
[8] rb_eval(0x3, 0x38, 0xb0480, 0x1, 0xdffff178, 0x0), at 0x1dc10
[9] rb_eval(0x94520, 0x4, 0x1050, 0x2, 0xdffff3c0, 0x1), at 0x1e060
[10] rb_eval(0x93248, 0x4, 0x0, 0x47b8c, 0x3, 0x3a), at 0x1cec8
[11] rb_eval(0x99788, 0x61c00, 0x0, 0x0, 0x0, 0x0), at 0x1cec8
[12] Eval(0x0, 0x65c00, 0x0, 0x65c00, 0x0, 0xdf73daa0), at 0x1c798
[13] ruby_run(0x2, 0xdffffa74, 0xdffffa80, 0x10000, 0x2, 0x0), at
0x1c860
[14] main(0x2, 0xdffffa74, 0xdffffa80, 0x66518, 0x0, 0x0), at
0x2ac2c
% uname -a
SunOS 5.4 Generic_101945-27 sun4d sparc
------------------------------------------------------------------------
0.95a では動作しました.
--
吉田淳