search for: remove_instance_variable

Displaying 5 results from an estimated 5 matches for "remove_instance_variable".

2006 Sep 20
0
boy, that mongrel_upload_progress handler sucks!
...ts in the console like this: class Leaker def key Time.now.to_i.to_s.split('''').sort_by { rand }.join end def inst_var instance_variable_set("@key_#{key}", nil) end def rem_var k = "@key_#{key}" instance_variable_set(k, Time.now) remove_instance_variable(k) end def hash @hash ||= {} k = key @hash[k] = Time.now @hash.delete k end end l = Leaker.new while 1; l.inst_var; end # eats memory! while 1; l.rem_var; end # eats memory! while 1; l.hash; end # stays at a constant 2mb -- Rick Olson http://weblog.techno-weenie.net htt...
2007 Apr 29
0
[992] branches/wxruby2/wxwidgets_282/lib/wx/classes/window.rb: Fix passing of PaintEvent object in paint handler
...;<ins>+ wrapped_block = proc do | event | </ins><span class="cx"> instance_variable_set("@__painting__", true) </span><del>- block.call </del><ins>+ block.call(event) </ins><span class="cx"> remove_instance_variable("@__painting__") </span><span class="cx"> end </span><span class="cx"> __old_evt_paint(&wrapped_block) </span></span></pre> </div> </div> </body> </html>
2007 Apr 29
0
[983] branches/wxruby2/wxwidgets_282: Make Window#paint work both inside and outside a paint event handler,
...t before running the event + # handler. This ensures that any call to Window#paint within the + # handler will supply a Wx::PaintDC (see swig/Window.i). + def evt_paint(&block) + wrapped_block = proc do + instance_variable_set("@__painting__", true) + block.call + remove_instance_variable("@__painting__") + end + __old_evt_paint(&wrapped_block) + end </ins><span class="cx"> end </span></span></pre></div> <a id="brancheswxruby2wxwidgets_282swigclassesWindowi"></a> <div class="modfile&quot...
2006 Mar 26
4
edge and 1.8.2/1.8.4 issues
I recently upgraded to 1.8.4 to try out mongrel, and so far have been in a kind of hell where I can''t get my app working! Currently running (or trying to run): Ruby version 1.8.4 (i386-mswin32) RubyGems version 0.8.11 Rails version 1.0.0 Active Record version 1.13.2 Action Pack version 1.11.2 Action Web Service version 1.0.0 Action Mailer version 1.1.5 Active Support version
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server