[macruby-changes] [3029] MacRuby/trunk/lib/hotcocoa/graphics/color.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue Nov 17 00:43:14 PST 2009
Revision: 3029
http://trac.macosforge.org/projects/ruby/changeset/3029
Author: mattaimonetti at gmail.com
Date: 2009-11-17 00:43:11 -0800 (Tue, 17 Nov 2009)
Log Message:
-----------
fixed a bug in HotCocoa graphics due to recent fix in visibility
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/graphics/color.rb
Modified: MacRuby/trunk/lib/hotcocoa/graphics/color.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/graphics/color.rb 2009-11-17 00:58:44 UTC (rev 3028)
+++ MacRuby/trunk/lib/hotcocoa/graphics/color.rb 2009-11-17 08:43:11 UTC (rev 3029)
@@ -196,8 +196,12 @@
]
COLORNAMES.each_key do |name|
- (class << self; self; end).define_method(name) do
- named(name)
+ # getting the metaclass class
+ klass = (class << self; self; end)
+ klass.instance_eval do
+ define_method(name) do
+ named(name)
+ end
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091117/68a20da9/attachment.html>
More information about the macruby-changes
mailing list