AdamKyle/RGSSDeveloperTools — Issue #4: Singleton Class does not work?
Author: AdamKyle
Created: 2011-10-26 15:34:17+00:00
State: open

Bug Reporter: Zeriab

Issue:

Your singleton module does unfortunately not work as my code below illustrates.

Example:

class Foo
@@c = 0
include RGSSDevModule::RGSSSingleton

def initialize
@@c +=
@c = @@c
end

def bar
return @c
end
end

p Foo.new.bar # => 1
p Foo.new.bar # => 2
p Foo.new.bar # => 3
p Foo.instance # => undefined method