makumba_import 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/makumba_import/legacy.rb +4 -4
- metadata +1 -1
@@ -26,15 +26,15 @@ class ActiveRecord::Base
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.pointer_type=(type)
|
29
|
-
|
29
|
+
@pointer_type = type
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.pointer_type
|
33
|
-
|
33
|
+
@pointer_type
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.find_by_ptr(ptr)
|
37
|
-
hc =
|
37
|
+
hc = @pointer_type.to_java_hashcode & "ffffffffl".to_i(16)
|
38
38
|
l = ptr.to_i(36)
|
39
39
|
n = l & "ffffffffl".to_i(16)
|
40
40
|
n = n ^ hc
|
@@ -80,7 +80,7 @@ class ActiveRecord::Base
|
|
80
80
|
|
81
81
|
n = self.id
|
82
82
|
|
83
|
-
hc =
|
83
|
+
hc = self.class.pointer_type.to_java_hashcode & "ffffffffl".to_i(16)
|
84
84
|
((crc(n) & "fl".to_i(16)) << 32 | n ^ hc).to_s(36)
|
85
85
|
end
|
86
86
|
|