caruby-core 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/caruby/resource.rb +14 -0
- data/lib/caruby/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/caruby/resource.rb
CHANGED
@@ -18,6 +18,20 @@ module CaRuby
|
|
18
18
|
# Classes which include Domain must implement the +metadata+ Domain::Metadata accessor method.
|
19
19
|
module Resource
|
20
20
|
include Mergeable, Migratable, Persistable, Inversible, Validation
|
21
|
+
|
22
|
+
# JRuby alert - Bug #5090 - JRuby 1.5 object_id no longer reserved, results in String value.
|
23
|
+
# See http://jira.codehaus.org/browse/JRUBY-5090.
|
24
|
+
# Work-around is to make a proxy object id.
|
25
|
+
#
|
26
|
+
# @return [Integer] the object id
|
27
|
+
def proxy_object_id
|
28
|
+
@_hc ||= (Object.new.object_id * 31) + 17
|
29
|
+
end
|
30
|
+
|
31
|
+
# Prints this object's class demodulized name and object id.
|
32
|
+
def print_class_and_id
|
33
|
+
"#{self.class.qp}@#{proxy_object_id}"
|
34
|
+
end
|
21
35
|
|
22
36
|
# Sets the default attribute values for this domain object and its dependents. If this Resource
|
23
37
|
# does not have an identifier, then missing attributes are set to the values defined by
|
data/lib/caruby/version.rb
CHANGED