Ruby 0.95 updated just enough to compile with GCC 5.4 on a modernish linux
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ext
lib
missing
sample
.gitignore
ChangeLog
MANIFEST
Makefile.in
Original_README
Original_README.EXT
README.md
ToDo
array.c
bignum.c
class.c
compar.c
config.guess
config.sub
configure
configure.in
defines.h
dir.c
dln.c
dln.h
dmyext.c
enum.c
env.h
error.c
eval.c
file.c
fnmatch.c
fnmatch.h
gc.c
glob.c
hash.c
inits.c
install-sh
io.c
io.h
main.c
math.c
node.h
numeric.c
object.c
pack.c
parse.y
process.c
random.c
range.c
re.c
re.h
regex.c
regex.h
ruby.c
ruby.h
ruby.texi
sig.h
signal.c
sprintf.c
st.c
st.h
string.c
struct.c
time.c
util.c
util.h
variable.c
version.c
version.h

README.md

Ruby 0.95

Ruby 0.95 was the first publicly released version of Ruby. It was originally published on December 21, 1995.

This is an attempt to get Ruby 0.95 to compile on a modern version of Linux (32-bit Ubuntu 16.04) using a modern compiler (GCC 5.4).

Why?

  • Why do it? Mostly because I thought it would make for a fun talk at a Ruby meet-up or conference.
  • Why Ubuntu 16.04? It's the last version of Ubuntu for which 32-bit images were published
  • Why 32-bit? 64-bit desktop systems weren't really a thing back in 1995: the first x86-64/AMD64 CPU was released in 2003.
  • Why Linux in the first place? My normal development computer is a Mac, but macOS/OS X wouldn't be released until 2001.

Compiling

This has only been tested with Ubuntu 16.04 (with GCC 5.4), but other distros would probably work too.

  1. Install the build dependencies
sudo apt install autoconf bison build-essential flex git
  1. Clone this repo
git clone https://github.com/matiaskorhonen/ruby-0.95.git
cd ruby-0.95
  1. Make the destination folders (I'm assuming that you don't want to install this system-wide)
# Note that this is a different directory than the git repo
mkdir -p ~/opt/bin
mkdir -p ~/opt/lib/ruby
  1. Configure the build
./configure --host=i386-unknown-linux --prefix="$HOME/opt"
  1. Compile the code
make
  1. Installed the newly compiled Ruby 0.95
make install
  1. Enjoy your ancient Ruby
echo 'print "Hello from Ruby 0.95\n"' | $HOME/opt/bin/ruby

Caveats

  • It segfaults if you look at it wrong
  • Many things that you might be used to don't exist (e.g. puts or anything HTTP related)
  • None of the extensions from ext/ are included because I could get the setup script to stop segfaulting