jeffrey-s-foster/rtc — Issue #20: Rtc has trouble with classnames
Author: jtoman
Created: 2012-03-02 23:49:14+00:00
State: open

The following will fail with the current version of Rtc

```ruby
require 'rtc'
class Foo
rtc_annotated
typesig("f: (Bar) -> Fixnum")
def f(b); 4; end
end
class Bar; end
```
With a "constant not defined" error. It appears that the parser automatically tries to get the class object of types mentioned in the type signature, even if that class is not yet available.

On a related note, the below code is also problematic:

```ruby
module MyModule
class Bar; end
class Foo
rtc_annotated
typesig("f: (Bar) -> Fixnum")
def f(b)
4
end
end
end
```
Apparently the parser looks for `Bar` in Object scope, not in the scope of MyModule.