mirror of
https://github.com/mistergibson/gxg-web-client.git
synced 2026-08-15 11:34:29 -07:00
28 lines
699 B
Ruby
28 lines
699 B
Ruby
module Rubinius
|
|
class ConstantCache
|
|
attr_reader :name
|
|
attr_reader :value
|
|
attr_reader :module
|
|
attr_reader :lexical_scope
|
|
attr_reader :executable
|
|
|
|
def ip
|
|
Rubinius.primitive :constant_cache_ip
|
|
raise PrimitiveFailure, "CallSite#ip primitive failed"
|
|
end
|
|
|
|
def serial
|
|
Rubinius.primitive :constant_cache_serial
|
|
raise PrimitiveFailure, "CallSite#serial primitive failed"
|
|
end
|
|
|
|
def location
|
|
"#{@executable.file}:#{@executable.line_from_ip(ip)}"
|
|
end
|
|
|
|
def inspect
|
|
"#<#{self.class.name}:0x#{self.object_id.to_s(16)} #{location}##{@name} constant=#{@value} module=#{@module} lexical_scope=#{@lexical_scope}>"
|
|
end
|
|
end
|
|
end
|
|
|