Ruby.NET
Short introduction
The project aims to create a Ruby compiler for .NET.
The initial development is based on the the Ruby.NET proposal.
It is not suitable for production work right now.
Source code access
Source code is stored in the Mono Subversion repository.
svn co svn+ssh://mono-cvs.ximian.com/source/trunk/rubynet
Architecture
Based on NetRuby by artonFiles
| File | Functions | Status |
|---|---|---|
| Built-in classes | ||
| Class.cs | Class and Module class (method dispatch etc.) | |
| Object.cs | Object class, Ruby main module | |
| Thread.cs | Dynamic scoping, Thread and ThreadGroup class | |
| Kernel.cs | Kernel module | |
| Array.cs | Array class | |
| Bignum.cs | Bignum class | |
| Const.cs | constants nil, false, true, undef | |
| Enum.cs | Enumerable module | |
| Exception.cs | Non-local control flow (tags), Exception class | |
| Hash.cs | Hash class | |
| IO.cs | IO module | incomplete |
| Numeric.cs | Fixnum, Float class | |
| Proc.cs | Proc class | |
| Regexp.cs | Regexp class | |
| String.cs | String class | |
| Symbol.cs | Symbol class | |
| Time.cs | Time class | |
| Compiler internals | ||
| NETRuby.cs | Ruby interpreter state, main class | |
| codegen.cs | Code generator for compiler | |
| Scanner.cs | Scanner (lexer) for Ruby source code | |
| node.cs | AST node classes for Ruby syntax | |
| node_print.cs | Pretty-printer for AST, automatically generated | |
| parse.y | Parser for Ruby source code | |
| skeleton.cs | Parser skeleton for Jay | |
| Loader.cs | Module/file loader | incomplete |
Types
| .NET type | Ruby type | Ruby.NET class/value |
|---|---|---|
| int | Fixnum | RFixnum |
| float | Float | RFloat |
| bool | false, true | RFalse, RTrue (NetRuby.oTrue, NetRuby.oFalse) |
| null | nil | RNil (NetRuby.oNil) |
| char[] (mutable string) | String | RString |
| object | Object | RBasic/RObject |
| object[] | Array | RArray |
| Hashtable | Hash | RHash |