0001-convert-varargs-to-stdarg.patch
The same as 0.95's.
Generated with all-ruby’s converter.
██╗ ██████╗ ███║ ██╔═████╗ ╚██║ ██║██╔██║ ██║ ████╔╝██║ ██║██╗╚██████╔╝ ╚═╝╚═╝ ╚═════╝
ruby-1.0ruby-1.0 -e 'print "Hello from Ruby ", VERSION, "\n"'~/samples/1.0/This is 1.0-971225, the last release of 1.0 (25 December 1997), which is
what VERSION and ruby-1.0 -v print. 1.0’s releases are numbered by date:
the first was 1.0-961225, a year to the day earlier, and the rest are from
1.0-971002 on.
Not patched: 0.95’s errno patch isn’t needed, because every file that
declares extern int errno; includes <errno.h> first, so the declaration
expands to glibc’s macro. strerror is found by configure, as for 0.95,
so missing/strerror.c (the other user of sys_nerr) isn’t built.
all-ruby’s glob-voidalloca only matters where <alloca.h> isn’t
included, which 0002 rules out, and nothing else in all-ruby is for this
release.
Unlike 0.95, Ruby 1.0’s ext/extmk.rb builds every extension that isn’t
listed in ext/Setup as a shared library, and ext/Setup lists none, so
make install puts eight into /opt/ruby/1.0/lib/ruby/i686-linux/:
curses, etc, fcntl, kconv, marshal, md5, socket and tkutil
(dbm is skipped). There are 34 libraries in lib/ruby/. socket asks
for -lnsl, but Debian links with --as-needed and it uses nothing from
it. tkutil loads but is no use without Tk. marshal and md5 build with
warnings that they pass argv as a VALUE rather than a VALUE *, which
is harmless on 32-bit x86, where both are 32 bits.
Every case in 1.0’s sample/test.rb passes, including array 2, so
knownTestFailures is empty. Its test.rb reports results differently
from 0.95’s (not ok <case> <n> -- <caller>, and
end of test(test: <count>)), and scripts/test-ruby.mjs reads both.
One bug in the release matters in the browser: loop do end, with an
empty block, can’t be interrupted. Ruby 1.0 handles SIGINT, SIGQUIT and
SIGTSTP by setting a flag that rb_eval() checks after evaluating a node,
and loop is a C for (;;) rb_yield(Qnil); that, with nothing in the
block, never evaluates one. There’s no second shell in the page to kill it
from, so it needs a reload. Any block with something in it
(loop do x = 1 end, as checks.busyLoop uses) and while TRUE; end stop
on Ctrl-C as expected. It’s left unpatched, like 0.95’s array 2.
sample/eval.rb is a small REPL, installed as eval-1.0. It can’t read a
line without 0005, and Ctrl-C quits it.
The same as 0.95's.
Generated with all-ruby’s converter.
The same as 0.95's.
In all-ruby: glob-alloca.
The same change at a different line.
The same as 0.95's.
1.0 already tests _STDIO_USES_IOSTREAM and _IO_fpos_t, but modern glibc
defines neither, so it now tests __GLIBC__ too.
In all-ruby: glibc-stdio.
error.c sizes its table of Errno classes with sys_nerr, which glibc
2.32 stopped exporting to newly linked programs. Under glibc it now uses
255, above Linux’s largest errno (133).
In all-ruby: error-sysnerr2.
FreeBSD only.
The same as 0.95's.
In 1.0, l = gets after two other locals was enough, so sample/eval.rb
read nil and exited at its first prompt.
st.c hashes a numeric key with n % modulus on a signed int, and the
marshal extension keys its tables by object address, so once the heap is
above 2 GiB, as it is in the guest, the bucket index is negative and the
table is written out of bounds. Marshal.dump of a Float or any non-empty
String crashed with a segfault. It now hashes the key as unsigned, as
1.4’s numhash() does.