Hi,

in a program that generates Ruby programs, I'd like to use MetaRuby's 
RubySchema.rb to generate the code.

I hope I can use it something like

   cd = ClassDef.new 'Foo'
   p cd.to_s
   # -> "class Foo\nend"

this
----------8<----------
$: << 'metaruby/metaruby-0.7'
require 'RubySchema.rb'

include Ruby
#############
#class DefClass < Tuple; fields_are \
#   [:name,Any.of IdentConst],
#   [:supername,IdentConst,NilClass],
#      # nil: class Foo; end
#      # other: class Foo<Bar; end
#   [:body,Body] end
########

class_def_01 = DefClass.new 'Tobi', nil, nil

puts class_def_01.methods
----------8<----------

brings

metaruby/metaruby-0.7/Type.rb:193:in `check_types': for an 
Ruby::DefClass, supplied name="Tobi" is not in type 
Any.of(#<Ruby::SymbolSubset:0x4587f38>) (TypeError)

Howto?

Tobi

-- 
http://www.pinkjuice.com/