MRuby library that allows constants defined by const_set(Class.new) to return the constant name when inspected
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
mrblib
README.md
mrbgem.rake

README.md

mruby-named-constants

MRuby library that allows constants of Module | Class set via const_set to return name when inspect or to_s is called on them

  ::Object.const_set :A, Class.new

  ::A.const_set :B, Class.new()
  ::A.const_set :C, Module.new()
  
  p ::A  # => A
  p A::B # => A::B
  p A::C # => A::C