Ruby 0.95

Details

Version
0.95
Released
Command
ruby-0.95
Try
ruby-0.95 -e 'print "hello\n"'
Samples
~/samples/0.95/
Source
ruby-0.95.tar.gz
SHA-256
8e549bfeaa8c93431115d5f818251ff12fab4b4b0bf64c71f77ceb67ce506f68
Known test failures
array 2

Notes

Not patched: sys_errlist only appears in missing/strerror.c, which isn’t built because configure finds strerror, and nothing in ext/ is enabled in 0.95’s ext/Setup (bar tkutil, which is skipped without Tk), so there are no shared libraries to link.

One case in sample/test.rb fails, and is expected to: array 2, because [0, 1, 2, 3, 4][1..3] returns []. That’s a bug in 0.95 itself (beg_len() in array.c tests beg < end where it means beg > end), so it is left alone and listed under knownTestFailures; the test fails if anything else fails, or if that case starts passing.

Patches

0002-include-errno-h.patch

extern int errno; doesn’t link against glibc’s thread-local errno; ruby.h now includes <errno.h>.

0005-eval-local-assignment.patch

Assigning to a local evaluates the value and stores it in the_scope->local_vars in one C expression, but evaluating it can move that array (the first gets adds $_ to it, and eval can add locals). C doesn’t say which comes first, and modern GCC reads the pointer first, so the value went into the freed array: with two locals already set, l = eval("q = 5; r = 6; s = 7; q + 1") left l as nil. The value is now evaluated first, as in 1.2.