rucy 0.1.28 → 0.1.29
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/.doc/ext/rucy/class.cpp +1 -1
- data/.doc/ext/rucy/exception.cpp +1 -1
- data/.doc/ext/rucy/function.cpp +1 -1
- data/.doc/ext/rucy/struct.cpp +1 -1
- data/.doc/ext/rucy/tester.cpp +1 -1
- data/.doc/ext/rucy/value.cpp +1 -1
- data/VERSION +1 -1
- data/ext/rucy/class.cpp +1 -1
- data/ext/rucy/defs.h +13 -0
- data/ext/rucy/exception.cpp +1 -1
- data/ext/rucy/function.cpp +1 -1
- data/ext/rucy/struct.cpp +1 -1
- data/ext/rucy/tester.cpp +1 -1
- data/ext/rucy/value.cpp +1 -1
- data/include/rucy/extension.h.erb +12 -9
- data/rucy.gemspec +1 -1
- data/src/class.cpp +3 -0
- metadata +5 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 24def7804f8e0e7610b1720165ad571a713c436c0726aededae1b01021e70530
         | 
| 4 | 
            +
              data.tar.gz: 798b35c1b70a07e1d3c7043600a87fe99f5ccfb73c267f6a936408db6f098d70
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e287b36d19e74811b01f25baf4d31571abe9b616650319ea58a55ac1a9ebe9d98ec99a89e27d24112d2ced807b676078310af88590f7e2be47191be2c31f7217
         | 
| 7 | 
            +
              data.tar.gz: 5320e909cbce0943fc564ee1ddda091d07376a1d301b4c79fafece40e5cb41dc9adc0553e0a17bad492018951e71f2401669d5e0a7173a633929c35659f5f905
         | 
    
        data/.doc/ext/rucy/class.cpp
    CHANGED
    
    
    
        data/.doc/ext/rucy/exception.cpp
    CHANGED
    
    
    
        data/.doc/ext/rucy/function.cpp
    CHANGED
    
    
    
        data/.doc/ext/rucy/struct.cpp
    CHANGED
    
    
    
        data/.doc/ext/rucy/tester.cpp
    CHANGED
    
    
    
        data/.doc/ext/rucy/value.cpp
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.1. | 
| 1 | 
            +
            0.1.29
         | 
    
        data/ext/rucy/class.cpp
    CHANGED
    
    
    
        data/ext/rucy/defs.h
    ADDED
    
    
    
        data/ext/rucy/exception.cpp
    CHANGED
    
    
    
        data/ext/rucy/function.cpp
    CHANGED
    
    
    
        data/ext/rucy/struct.cpp
    CHANGED
    
    
    
        data/ext/rucy/tester.cpp
    CHANGED
    
    
    
        data/ext/rucy/value.cpp
    CHANGED
    
    
| @@ -197,7 +197,7 @@ | |
| 197 197 | 
             
            	 \
         | 
| 198 198 | 
             
            	RUCY__ruby_jump_tag__: \
         | 
| 199 199 | 
             
            	if (RUCY__rubyjumptag__) rb_jump_tag(RUCY__rubyjumptag__); \
         | 
| 200 | 
            -
            	 | 
| 200 | 
            +
            	RUCY_GOTO_RAISE(rb_exc_new2(Rucy::native_error_class(), "Bad jump tag.")); \
         | 
| 201 201 | 
             
            	 \
         | 
| 202 202 | 
             
            	RUCY__ruby_raise_exception__: \
         | 
| 203 203 | 
             
            	rb_exc_raise(RUCY__rubyexception__); \
         | 
| @@ -215,11 +215,11 @@ | |
| 215 215 | 
             
            	} \
         | 
| 216 216 | 
             
            	catch (const Rucy::RubyException& e) \
         | 
| 217 217 | 
             
            	{ \
         | 
| 218 | 
            -
            		 | 
| 218 | 
            +
            		RUCY_GOTO_RAISE(e.value()); \
         | 
| 219 219 | 
             
            	} \
         | 
| 220 220 | 
             
            	catch (const std::invalid_argument& e) \
         | 
| 221 221 | 
             
            	{ \
         | 
| 222 | 
            -
            		 | 
| 222 | 
            +
            		RUCY_GOTO_RAISE(rb_exc_new2(rb_eArgError, e.what())); \
         | 
| 223 223 | 
             
            	} \
         | 
| 224 224 | 
             
            	catch (const std::exception& e) \
         | 
| 225 225 | 
             
            	{ \
         | 
| @@ -229,26 +229,29 @@ | |
| 229 229 | 
             
            			if (!text.empty()) text += " "; \
         | 
| 230 230 | 
             
            			text += "[" + type + "]"; \
         | 
| 231 231 | 
             
            		} \
         | 
| 232 | 
            -
            		 | 
| 232 | 
            +
            		RUCY_GOTO_RAISE(rb_exc_new2(Rucy::native_error_class(), text.c_str())); \
         | 
| 233 233 | 
             
            	} \
         | 
| 234 234 | 
             
            	catch (const std::string& s) \
         | 
| 235 235 | 
             
            	{ \
         | 
| 236 | 
            -
            		 | 
| 236 | 
            +
            		RUCY_GOTO_RAISE(rb_exc_new2(Rucy::native_error_class(), s.c_str())); \
         | 
| 237 237 | 
             
            	} \
         | 
| 238 238 | 
             
            	catch (const char* s) \
         | 
| 239 239 | 
             
            	{ \
         | 
| 240 | 
            -
            		 | 
| 240 | 
            +
            		RUCY_GOTO_RAISE(rb_exc_new2(Rucy::native_error_class(), s)); \
         | 
| 241 241 | 
             
            	} \
         | 
| 242 242 | 
             
            	catch (...) \
         | 
| 243 243 | 
             
            	{ \
         | 
| 244 | 
            -
            		 | 
| 244 | 
            +
            		RUCY_GOTO_RAISE(rb_exc_new2( \
         | 
| 245 245 | 
             
            			Rucy::native_error_class(), "Unknown C++ exception was thrown.")); \
         | 
| 246 246 | 
             
            	}
         | 
| 247 247 |  | 
| 248 | 
            -
            #define  | 
| 248 | 
            +
            #define RUCY_GOTO_RAISE(exception) \
         | 
| 249 249 | 
             
            	RUCY__rubyexception__ = (exception); \
         | 
| 250 250 | 
             
            	goto RUCY__ruby_raise_exception__
         | 
| 251 251 |  | 
| 252 | 
            +
            #define RUCY_RAISE(ruby_error_class, message) \
         | 
| 253 | 
            +
            	rb_exc_raise(rb_exc_new2(ruby_error_class, message))
         | 
| 254 | 
            +
             | 
| 252 255 |  | 
| 253 256 | 
             
            #define RUCY_DEF_ALLOC(name, klass) \
         | 
| 254 257 | 
             
            	Rucy::RubyValue name (Rucy::Value klass) \
         | 
| @@ -267,7 +270,7 @@ | |
| 267 270 | 
             
            		RUCY_TRY
         | 
| 268 271 | 
             
            %	end
         | 
| 269 272 |  | 
| 270 | 
            -
            #define  | 
| 273 | 
            +
            #define RUCY_DEF_END \
         | 
| 271 274 | 
             
            		RUCY_CATCH \
         | 
| 272 275 | 
             
            		return Rucy::nil(); \
         | 
| 273 276 | 
             
            	}
         | 
    
        data/rucy.gemspec
    CHANGED
    
    | @@ -28,7 +28,7 @@ Gem::Specification.new do |s| | |
| 28 28 | 
             
              s.platform              = Gem::Platform::RUBY
         | 
| 29 29 | 
             
              s.required_ruby_version = '>= 2.6.0'
         | 
| 30 30 |  | 
| 31 | 
            -
              s.add_runtime_dependency 'xot', '~> 0.1. | 
| 31 | 
            +
              s.add_runtime_dependency 'xot', '~> 0.1.29'
         | 
| 32 32 |  | 
| 33 33 | 
             
              s.files            = `git ls-files`.split $/
         | 
| 34 34 | 
             
              s.executables      = s.files.grep(%r{^bin/}) {|f| File.basename f}
         | 
    
        data/src/class.cpp
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rucy
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.29
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - xordog
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022- | 
| 11 | 
            +
            date: 2022-11-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: xot
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 0.1. | 
| 19 | 
            +
                    version: 0.1.29
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 0.1. | 
| 26 | 
            +
                    version: 0.1.29
         | 
| 27 27 | 
             
            description: This library helps you to develop Ruby Extension by C++.
         | 
| 28 28 | 
             
            email: xordog@gmail.com
         | 
| 29 29 | 
             
            executables:
         | 
| @@ -51,6 +51,7 @@ files: | |
| 51 51 | 
             
            - bin/rucy2rdoc
         | 
| 52 52 | 
             
            - ext/rucy/class.cpp
         | 
| 53 53 | 
             
            - ext/rucy/class.h
         | 
| 54 | 
            +
            - ext/rucy/defs.h
         | 
| 54 55 | 
             
            - ext/rucy/exception.cpp
         | 
| 55 56 | 
             
            - ext/rucy/extconf.rb
         | 
| 56 57 | 
             
            - ext/rucy/function.cpp
         |