diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-05 08:40:27 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-05 08:40:27 +0000 |
| commit | 5123afe6145b5d967fcce725b3821ad97cf8fd83 (patch) | |
| tree | d017ac4f0a339440fb13d2473673f254ce98ec38 /ext/tk/lib | |
| parent | 28f806a119f0c3acaf4b91b8b652b324282b450d (diff) | |
| download | ruby-5123afe6145b5d967fcce725b3821ad97cf8fd83.tar.gz ruby-5123afe6145b5d967fcce725b3821ad97cf8fd83.tar.xz ruby-5123afe6145b5d967fcce725b3821ad97cf8fd83.zip | |
* lib/observer.rb: a patch from nornagon <nornagon@gmail.com>
merged to allow arbitrary names for update methods.
[ruby-core:05416]
* eval.c (rb_f_fcall): new method to avoid inefficiency of
obj.instance_eval{send(...)} tricks.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
| -rw-r--r-- | ext/tk/lib/tk/font.rb | 4 | ||||
| -rw-r--r-- | ext/tk/lib/tkextlib/ICONS/icons.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/tk/lib/tk/font.rb b/ext/tk/lib/tk/font.rb index 8e63558ca..73e0ac468 100644 --- a/ext/tk/lib/tk/font.rb +++ b/ext/tk/lib/tk/font.rb @@ -1186,13 +1186,13 @@ class TkFont def dup src = self obj = super() - obj.instance_eval{ initialize(src) } + obj.fcall(:initialize, src) obj end def clone src = self obj = super() - obj.instance_eval{ initialize(src) } + obj.fcall(:initialize, src) obj end =end diff --git a/ext/tk/lib/tkextlib/ICONS/icons.rb b/ext/tk/lib/tkextlib/ICONS/icons.rb index 8a37e35eb..e02b579d0 100644 --- a/ext/tk/lib/tkextlib/ICONS/icons.rb +++ b/ext/tk/lib/tkextlib/ICONS/icons.rb @@ -78,7 +78,7 @@ module Tk def self.new(name, keys=nil) unless obj = Tk_IMGTBL["::icon::#{name}"] obj = allocate() - obj.instance_eval{initialize(name, keys)} + obj.fcall(:initialize, name, keys) end obj end |
