Displaying 5 results from an estimated 5 matches for "_id2ref".
Did you mean:
_deref
2008 May 18
2
Pure win32-thread library?
Hi all,
Here''s my initial stab at a pure Ruby win32-thread library that doesn''t
work at all. I''m not sure how to pass the start address of the arguments
to the callback. I thought about Marshal, but you can''t marshal a proc.
BTW, the CreateThread method in windows-pr needs to be updated for this
to have any hope of success.
Any ideas?
Thanks,
Dan
#
2006 Jan 19
0
Problem with an Tree-like object hierarchy (ActiveRecord acts_as_tree)
...def unfreeze_taxtree
if taxtree_frozen then return Marshal.load(session[:tax_tree])
else return nil end
end
def freeze_taxtree(tax)
return session[:tax_tree] = Marshal.dump(tax)
end
def get_tax_from_freezer(tax_id)
@@tax_tree = unfreeze_taxtree
ObjectSpace._id2ref(@@tax_tree.find_tax(tax_id))
end
So tax are the nodes and tax_tree the ... well ... tree.
I did the marshaling and retrieving via object id because I was
getting paranoid about the objects not being the original ones after
unfreezing from the session cache.
Before the first freezing I tried...
2007 Sep 18
2
Making attachment_fu polymorphic
...and :attachable_type to whatever you
are using. Also, be sure to
# update the default value for ''path'' in the file_system case
from ''attachements''
# to whatever your table name is.
def initialize(attributes={})
@p = ObjectSpace._id2ref(#{parent})
path = if "#{@@attachment_config[:path_prefix]}".to_s == ""
pth = case "#{@@attachment_config[:storage]}".to_s
when "file_system"
"public/attachments"...
2006 Nov 01
1
strange issue with backgroundrb behind apache/lighttpd
...)
[POST]
Session ID: 671f4ba93603f34e036d9bbc65919ca7
Parameters: {"action"=>"get_responses", "controller"=>"search"}
getting responses
RangeError (0xdb677f22 is recycled object):
(druby://localhost:42531) /usr/lib/ruby/1.8/drb/drb.rb:375:in `_id2ref''
(druby://localhost:42531) /usr/lib/ruby/1.8/drb/drb.rb:375:in `to_obj''
(druby://localhost:42531) /usr/lib/ruby/1.8/drb/drb.rb:1402:in `to_obj''
(druby://localhost:42531) /usr/lib/ruby/1.8/drb/drb.rb:1704:in `to_obj''
(druby://localhost:42531) /usr/...
2007 Nov 12
0
Workers calling Workers
...7 by logger.rb/1.5.2.9
20071109-17:30:03 (27237) Starting WorkerLogger
20071109-17:30:04 (27238) In ResultsWorker
20071109-17:30:20 (27238) Work started
20071109-17:30:20 (27238) 0xdba48138 is recycled object - (RangeError)
20071109-17:30:20 (27238) /usr/local/lib/ruby/1.8/drb/drb.rb:375:in
`_id2ref''
20071109-17:30:20 (27238) /usr/local/lib/ruby/1.8/drb/drb.rb:375:in
`to_obj''
20071109-17:30:20 (27238) /usr/local/lib/ruby/1.8/drb/drb.rb:1402:in
`to_obj''
20071109-17:30:20 (27238) /usr/local/lib/ruby/1.8/drb/drb.rb:1704:in
`to_obj''
20071109-17:30:20 (27...