diff options
| author | Casey Dahlin <cdahlin@redhat.com> | 2008-11-07 15:17:32 -0500 |
|---|---|---|
| committer | Casey Dahlin <cdahlin@redhat.com> | 2008-11-07 15:17:32 -0500 |
| commit | a1ee900b937c59d182491d78e1bc2b86545dcfea (patch) | |
| tree | c905479e346184d30ce49cd5333781120019f6fe | |
| parent | 174313860aa680c063b7fd2783fe6a7b637d64d4 (diff) | |
| download | upstate-a1ee900b937c59d182491d78e1bc2b86545dcfea.tar.gz upstate-a1ee900b937c59d182491d78e1bc2b86545dcfea.tar.xz upstate-a1ee900b937c59d182491d78e1bc2b86545dcfea.zip | |
Make names for state classes explicit.
Don't truss ruby to return the correct name for SomeState.class.name when
SomeState might be passed around in other constants.
| -rw-r--r-- | state.rb | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -233,7 +233,11 @@ class State newtype.hold_provides = hold_provides newtype.instance_eval do undef :new_type, :process_event, :gc, :depsolve_all + def name + @name + end end + newtype.instance_variable_set(:@name, name) @@state_types.add newtype newtype.depsolve newtype |
