GSoC 2007 : Cover the core of Ruby with RSpec

There are a number of Ruby implementations available today. The “standard” implementation is the original C-language-based implementation, written by Yukihiro Matsumoto, and now maintained by him and a number of contributors. In the last year, emerge different Ruby Virtual Machine (VM), YARV, Rubinius, JRuby, Gardens Point Ruby .NET, XRuby or cardinal are some good examples among others [1]. The goal of this proposal is create a common set of specification (using rspec) for the Ruby core, that verify the correct and same behavior of the different virtual machines and implementation. I would like the specs be usable for any virtual machine implementation or implementation.

The goal in writing a spec is to describe the expected behavior from the objects. Each specification should describe one facet of the behavior. Specs should prefer clarity and understanding over any other principle.

This projects do not start from the scratch, there is a important code base from the rubinius project that i could reuse. All the code that i develop will be directly compatible with the rspec code base of rubinius.

Test Driven Development (TDD) has you define the behavior of your system by writing small tests that precisely define some small piece of your system’s behavior. Then you implement that behavior.

* language is for specs that describe language-level constructs.
* core is for specs for any of the built-in classes in Ruby. These are documented at

I have wrote the first time about this a in the ruby-talk mailing list. Looking for some feedback from the community.

=== The ruby core set : ===

* language : assignament, class, expression, method, operators, variables. exception.

* core library : array, proc, bignum, hash, range, binding, integer, regexp, class, io, signal, comparable, kernel , sprintf, marshal, string,dir, matchdata, struct, enumerable, math, symbol, errno, method, threadgroup, exception, module, thread, false, nil, time, file, numeric , true, objectspace, unboundmethod, fixnum, object, float, process.

* core/literals :numbers, string, block, hash, regexp, symbol.

=== Benefits to the Community ===

The goal would be to have a single specification that different ruby implementations can check against it. If the community have a well defined and reusable specification to check against it.

I also think that this project could provide great value for the implementors of other ruby implementations – having a single source against which all rubies can be verified.

=== Development plan ===

0) Before start the projects. Improve my skills reading the rspec mailing list. Read specs code form open source projects that already use rspec.

1) Identify/define the core in the Ruby implementation. And document their behavior.
– Discuss in each vm or implementation mailing list, what primitives, structures and libraries must been in the core of ruby.
– Discuss in the ruby-core mailing list the correct behavior.

2) Extract the initial code from the rubinius rspec code base.

3) Create a easy rake task to develop that allow one command testing.

3) Write the rspec for language.

4) Write specs for core/literals.

5) Write spec for the rest of the core.

6) Write documentation.

=== Related frameworks : ===

* Rspec
* Rubinius rspec code base.

=== About me: ===

I am 28 y.o., and I am 5th year student of Computer Science at Universidad de Granada, Spain. I’ll graduate in about 9 month. My interests are virtual machines, web technologies, object-oriented systems, functional languages and many other things.

I work in software company in Hamburg, Germany. My current duty is Ruby/Rails development. My graduate work in university is dedicated to applying Latent Semantic Indexing to natural languages processing.

I also have extensive experience in the Linux-Tomcat-Java-Struts architecture.

My relevant skills include proficiency in C, Java, Lisp, Ruby the standard GNU development tools (gcc, automake, etc.), Java tools (Xdoclet, ant, maven), CVS/SVN, and a host of other smaller languages and tools. I’ve been involved in the open source community for a while. I help to build and configurate Gforge (sourceforge) site for the Java spanish spoken community.

I’ve been working with a rspec last month, to test the core of the application of my employer.

=== Motivation and interests: ===

I have been involved in language design and in the implementation of a virtual machine for acadimic propose. I think with this project i obtain a more deeply knowledge about the conceptual design of real language.

So, I think, I can do this task.

=== Available time: ===

In the beginning of the project (to the end of June), I will be somewhat limited by school – our semester ends by the end of May, followed by one month reserved for exams. During that time, I will spend some time learning and doing exams, so I cannot commit myself into this project fully during June. But I am sure I will be able to find time. After that, I will have 2 months holiday that I plan spending fully for the project.

Reference :

1 :
2 :

3 comments so far

  1. […] 12th, 2007 by Pedro My Ruby proposal Cover the core of Ruby with Rspec was accepted. I think its gone to be a great summer for me, working and learning with really […]

  2. penyaskito on

    Congratulations! I have been selected too!
    How many spanish students have been selected?
    I wish you the best!

  3. : Rubinius und JRuby on

    […] Cover the Ruby core with RSpec […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: