rbplusplus 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/rbplusplus/builders/method_base.rb +1 -0
 - data/test/function_pointers_classes_test.rb +13 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2b46d18b052b660d61d767119e5361612cfa27b7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: fa5a71e072d45f5b95ab8e148c592f2df321346a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 7e6eea6408d6f603d69217d5fb6cebee67eabc66183b63531f56d9cdff20b6e701fb8a0b16c627d4b2b75f65db732009d830a7fdfdb7926639a9642dc1269431
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b6ef36296123e5cd86ec07341d9964adfc3679777b1822963e40043ed43c17014b377410212a57645479a0f644cd4662c3667254de555ff708014a61bfb6fa90
         
     | 
| 
         @@ -92,6 +92,7 @@ module RbPlusPlus 
     | 
|
| 
       92 
92 
     | 
    
         
             
                    # Build the wrapper method that gets exposed to Ruby
         
     | 
| 
       93 
93 
     | 
    
         
             
                    declarations << "VALUE #{wrapper_func}(#{arg}) {"
         
     | 
| 
       94 
94 
     | 
    
         
             
                    declarations << "\t#{block_var_name} = rb_block_proc();"
         
     | 
| 
      
 95 
     | 
    
         
            +
                    declarations << "\trb_gc_register_address(&#{block_var_name});"
         
     | 
| 
       95 
96 
     | 
    
         
             
                    declarations << "\t#{callee}(&#{proxy_method_name});"
         
     | 
| 
       96 
97 
     | 
    
         
             
                    declarations << "\treturn Qnil;"
         
     | 
| 
       97 
98 
     | 
    
         
             
                    declarations << "}"
         
     | 
| 
         @@ -20,4 +20,17 @@ describe "Function pointers into class methods" do 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
                t.call_callback(12).should == 42
         
     | 
| 
       22 
22 
     | 
    
         
             
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              specify "keeps the block marked in the GC" do
         
     | 
| 
      
 25 
     | 
    
         
            +
                t = PointerTest.new
         
     | 
| 
      
 26 
     | 
    
         
            +
                t.set_callback do |i|
         
     | 
| 
      
 27 
     | 
    
         
            +
                  14
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                t.call_callback(12)
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                GC.start
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                t.call_callback(12).should == 14
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
       23 
36 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rbplusplus
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.2.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jason Roelofs
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-03-03 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rbgccxml
         
     |