public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
Original object's inspect should be added to the distributed proxy object's 
inspect [#80 state:resolved]
markbates (author)
Thu Aug 07 15:03:34 -0700 2008
commit  a12d7dea695d90ebf116d02dc135edb34d0784d7
tree    12e117b3047026b9a97b4e195c2d65d784eab65a
parent  7ce307c13829c559ee9ab8ce881bcf19fcff5272
...
30
31
32
 
 
 
 
 
 
 
 
33
34
35
...
45
46
47
48
49
 
 
 
 
 
 
 
50
...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
...
53
54
55
 
56
57
58
59
60
61
62
63
64
0
@@ -30,6 +30,14 @@ module Mack # :nodoc:
0
               def method_missing(sym, *args)
0
                 #{base}.send(sym, *args)
0
               end
0
+              
0
+              def inspect
0
+                #{base}.inspect
0
+              end
0
+              
0
+              def to_s
0
+                #{base}.to_s
0
+              end
0
             
0
               # def respond_to?(sym)
0
               #   #{base}.respond_to?(sym)
0
@@ -45,4 +53,10 @@ module Mack # :nodoc:
0
       
0
     end # Object
0
   end # Distributed
0
-end # Mack
0
\ No newline at end of file
0
+end # Mack
0
+
0
+module DRb # :nodoc:
0
+  class DRbObject # :nodoc:
0
+    undef_method :inspect
0
+  end
0
+end
0
\ No newline at end of file
...
49
50
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
53
54
...
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
0
@@ -49,5 +49,19 @@ describe Mack::Distributed::Object do
0
     Mack::Distributed::CarProxy.instance.buy.should == true
0
   end
0
   
0
+  it "should reference the original objects inspect method" do
0
+    class Bike
0
+      include Mack::Distributed::Object
0
+      def inspect
0
+        "<BikeClass>"
0
+      end
0
+      def to_s
0
+        "i'm a bike"
0
+      end
0
+    end
0
+    c = Mack::Distributed::Utils::Rinda.read(:klass_def => :Bike)
0
+    c.inspect.should match(/Bike/)
0
+    c.new.to_s.should match(/i'm a bike/)
0
+  end
0
 
0
 end
0
\ No newline at end of file

Comments