rubinius newbie

22 views
Skip to first unread message

Siddharth Karandikar

unread,
Dec 15, 2010, 5:11:09 AM12/15/10
to rubini...@googlegroups.com
Hi All,

Couple of days back, I watched Brian's Rubinius VM talk available @
Galois's Viemo channel. I knew about Rubinius before, but the talk
opened up lot more details; like why new implementation, why implement
most part in Ruby than in C/C++, how to test and validate etc.
So decided to give it a try.

It was just amazing to see complete Ruby VM with JIT support getting
built in front of your eyes and your everyday ruby code is running
successfully on it!

Now while running specs, I am seeing few failures. e.g.
siddharth@jupiter:~/tools/src/rubinius$ mspec -t
~/tools/rubinius/bin/ruby
spec/ruby/library/parsedate/parsedate_spec.rb
rubinius 1.1.1 (1.8.7 ae95ec31 2010-11-16 JI) [i686-pc-linux-gnu]
..................F..
1)
ParseDate.parsedate returns Array with year and month set, given a
String like nn-nn FAILED
Expected [nil, nil, 8, nil, nil, nil, "-09", nil]
to equal [8, 9, nil, nil, nil, nil, nil, nil]
...
..
..
1 file, 21 examples, 26 expectations, 1 failure, 0 errors

What is the general procedure if I want to fix a failure and submit a patch?
In above example, should the fix be applied to parsedate library
implementation or to spec file? What to consider as baseline? MRI?


Thanks,
Siddharth

Chuck Remes

unread,
Dec 15, 2010, 2:47:25 PM12/15/10
to rubini...@googlegroups.com


There are some docs you can read which explain the process in detail. Run 'rbx docs' and it will (on OSX at least) launch a browser window containing the documentation.

The short version is this:

1. Checkout the rubinius project
2. Write a spec that illustrates the bug. If the bug is in a library, write the spec for that specific library.
3. Write the code in rubinius (or the library) that fixes the bug
4. Make sure your spec (and all of the original specs) pass.
5. Submit a ticket containing two files: the spec patch and the code patch

Also, feel free to join us on freenode.net in the #rubinius channel. It's pretty busy.

cr

Siddharth Karandikar

unread,
Dec 15, 2010, 10:03:39 PM12/15/10
to rubini...@googlegroups.com
Thanks for the info Chuck.

I did look @ rbx docs. Contributing section under 'rbx docs' mentions
how to write or fix specs.
Question that I have is, take following case, one parsedate spec is
failing in rubinius, but it is also failing with same output in MRI.
Now should we update spec file assuming what ever implemented (in mri
and in rubinius parsedate library) is correct?

rubinius 1.1.1 (1.8.7 ae95ec31 2010-11-16 JI) [i686-pc-linux-gnu]
..................F..
1)
ParseDate.parsedate returns Array with year and month set, given a
String like nn-nn FAILED
Expected [nil, nil, 8, nil, nil, nil, "-09", nil]
to equal [8, 9, nil, nil, nil, nil, nil, nil]


ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]


..................F..
1)
ParseDate.parsedate returns Array with year and month set, given a
String like nn-nn FAILED
Expected [nil, nil, 8, nil, nil, nil, "-09", nil]
to equal [8, 9, nil, nil, nil, nil, nil, nil]

- Siddharth

> --
> --- !ruby/object:MailingList
> name: rubinius-dev
> view: http://groups.google.com/group/rubinius-dev?hl=en
> post: rubini...@googlegroups.com
> unsubscribe: rubinius-dev...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages