script_core 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -6
- data/.ruby-version +1 -1
- data/Gemfile +2 -1
- data/bin/sandbox +1 -1
- data/ext/enterprise_script_service/Rakefile +1 -1
- data/ext/enterprise_script_service/flags.rb +5 -0
- data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
- data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
- data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/README.md +1 -1
- data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
- data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
- data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
- data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
- data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
- data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
- data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
- data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
- data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
- data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
- data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
- data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
- data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
- data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
- data/ext/enterprise_script_service/mruby/.gitignore +2 -2
- data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
- data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
- data/ext/enterprise_script_service/mruby/README.md +21 -8
- data/ext/enterprise_script_service/mruby/Rakefile +4 -13
- data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
- data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
- data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
- data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
- data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
- data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
- data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
- data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
- data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
- data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
- data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
- data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
- data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
- data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
- data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
- data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
- data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
- data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
- data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
- data/ext/enterprise_script_service/mruby/minirake +27 -11
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
- data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
- data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
- data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
- data/ext/enterprise_script_service/mruby/src/array.c +95 -46
- data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
- data/ext/enterprise_script_service/mruby/src/class.c +370 -278
- data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
- data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
- data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
- data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
- data/ext/enterprise_script_service/mruby/src/error.c +157 -55
- data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
- data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
- data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
- data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
- data/ext/enterprise_script_service/mruby/src/load.c +40 -76
- data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
- data/ext/enterprise_script_service/mruby/src/object.c +16 -39
- data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
- data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
- data/ext/enterprise_script_service/mruby/src/range.c +22 -35
- data/ext/enterprise_script_service/mruby/src/state.c +5 -94
- data/ext/enterprise_script_service/mruby/src/string.c +874 -710
- data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
- data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
- data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
- data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
- data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
- data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
- data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
- data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
- data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
- data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
- data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
- data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
- data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
- data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
- data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
- data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
- data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
- data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
- data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
- data/ext/enterprise_script_service/mruby_config.rb +10 -0
- data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
- data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
- data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
- data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
- data/ext/enterprise_script_service/msgpack/README.md +1 -1
- data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
- data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
- data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
- data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
- data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
- data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
- data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
- data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
- data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
- data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
- data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
- data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
- data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
- data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
- data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
- data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
- data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
- data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
- data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
- data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/mruby/engine.gembox.example +1 -0
- data/lib/tasks/script_core.rake +21 -3
- data/spec/dummy/app/helpers/fields_helper.rb +2 -2
- data/spec/dummy/mruby/engine.gembox +1 -0
- data/spec/script_core_spec.rb +1 -1
- metadata +38 -22
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/run_test.rb +0 -28
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
** mruby/value.h - mruby value definitions
|
1
|
+
/**
|
2
|
+
** @file mruby/value.h - mruby value definitions
|
3
3
|
**
|
4
4
|
** See Copyright Notice in mruby.h
|
5
5
|
*/
|
@@ -9,12 +9,28 @@
|
|
9
9
|
|
10
10
|
#include "common.h"
|
11
11
|
|
12
|
-
|
12
|
+
/*
|
13
13
|
* MRuby Value definition functions and macros.
|
14
14
|
*/
|
15
15
|
MRB_BEGIN_DECL
|
16
16
|
|
17
|
+
/**
|
18
|
+
* mruby Symbol.
|
19
|
+
* @class mrb_sym
|
20
|
+
*
|
21
|
+
* You can create an mrb_sym by simply using mrb_str_intern() or mrb_intern_cstr()
|
22
|
+
*/
|
17
23
|
typedef uint32_t mrb_sym;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* mruby Boolean.
|
27
|
+
* @class mrb_bool
|
28
|
+
*
|
29
|
+
*
|
30
|
+
* Used internally to represent boolean. Can be TRUE or FALSE.
|
31
|
+
* Not to be confused with Ruby's boolean classes, which can be
|
32
|
+
* obtained using mrb_false_value() and mrb_true_value()
|
33
|
+
*/
|
18
34
|
typedef uint8_t mrb_bool;
|
19
35
|
struct mrb_state;
|
20
36
|
|
@@ -25,12 +41,15 @@ struct mrb_state;
|
|
25
41
|
#if defined _MSC_VER && _MSC_VER < 1800
|
26
42
|
# define PRIo64 "llo"
|
27
43
|
# define PRId64 "lld"
|
44
|
+
# define PRIu64 "llu"
|
28
45
|
# define PRIx64 "llx"
|
29
46
|
# define PRIo16 "ho"
|
30
47
|
# define PRId16 "hd"
|
48
|
+
# define PRIu16 "hu"
|
31
49
|
# define PRIx16 "hx"
|
32
50
|
# define PRIo32 "o"
|
33
51
|
# define PRId32 "d"
|
52
|
+
# define PRIu32 "u"
|
34
53
|
# define PRIx32 "x"
|
35
54
|
#else
|
36
55
|
# include <inttypes.h>
|
@@ -62,6 +81,11 @@ struct mrb_state;
|
|
62
81
|
# define MRB_PRIx PRIx32
|
63
82
|
#endif
|
64
83
|
|
84
|
+
#ifdef MRB_ENDIAN_BIG
|
85
|
+
# define MRB_ENDIAN_LOHI(a,b) a b
|
86
|
+
#else
|
87
|
+
# define MRB_ENDIAN_LOHI(a,b) b a
|
88
|
+
#endif
|
65
89
|
|
66
90
|
#ifndef MRB_WITHOUT_FLOAT
|
67
91
|
MRB_API double mrb_float_read(const char*, char**);
|
@@ -73,9 +97,6 @@ MRB_API double mrb_float_read(const char*, char**);
|
|
73
97
|
#endif
|
74
98
|
|
75
99
|
#if defined _MSC_VER && _MSC_VER < 1900
|
76
|
-
# ifndef __cplusplus
|
77
|
-
# define inline __inline
|
78
|
-
# endif
|
79
100
|
# include <stdarg.h>
|
80
101
|
MRB_API int mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list arg);
|
81
102
|
MRB_API int mrb_msvc_snprintf(char *s, size_t n, const char *format, ...);
|
@@ -95,13 +116,13 @@ static const unsigned int IEEE754_INFINITY_BITS_SINGLE = 0x7F800000;
|
|
95
116
|
|
96
117
|
enum mrb_vtype {
|
97
118
|
MRB_TT_FALSE = 0, /* 0 */
|
98
|
-
|
99
|
-
|
119
|
+
MRB_TT_TRUE, /* 1 */
|
120
|
+
MRB_TT_FLOAT, /* 2 */
|
100
121
|
MRB_TT_FIXNUM, /* 3 */
|
101
122
|
MRB_TT_SYMBOL, /* 4 */
|
102
123
|
MRB_TT_UNDEF, /* 5 */
|
103
|
-
|
104
|
-
|
124
|
+
MRB_TT_CPTR, /* 6 */
|
125
|
+
MRB_TT_FREE, /* 7 */
|
105
126
|
MRB_TT_OBJECT, /* 8 */
|
106
127
|
MRB_TT_CLASS, /* 9 */
|
107
128
|
MRB_TT_MODULE, /* 10 */
|
@@ -148,36 +169,111 @@ typedef void mrb_value;
|
|
148
169
|
#include "boxing_no.h"
|
149
170
|
#endif
|
150
171
|
|
172
|
+
#if !defined(MRB_SYMBOL_BIT)
|
173
|
+
#define MRB_SYMBOL_BIT (sizeof(mrb_sym) * CHAR_BIT)
|
174
|
+
#define MRB_SYMBOL_MAX UINT32_MAX
|
175
|
+
#endif
|
176
|
+
|
177
|
+
#if INTPTR_MAX < MRB_INT_MAX
|
178
|
+
typedef intptr_t mrb_ssize;
|
179
|
+
# define MRB_SSIZE_MAX (INTPTR_MAX>>MRB_FIXNUM_SHIFT)
|
180
|
+
#else
|
181
|
+
typedef mrb_int mrb_ssize;
|
182
|
+
# define MRB_SSIZE_MAX MRB_INT_MAX
|
183
|
+
#endif
|
184
|
+
|
185
|
+
#ifndef mrb_immediate_p
|
186
|
+
#define mrb_immediate_p(o) (mrb_type(o) < MRB_TT_FREE)
|
187
|
+
#endif
|
151
188
|
#ifndef mrb_fixnum_p
|
152
189
|
#define mrb_fixnum_p(o) (mrb_type(o) == MRB_TT_FIXNUM)
|
153
190
|
#endif
|
191
|
+
#ifndef mrb_symbol_p
|
192
|
+
#define mrb_symbol_p(o) (mrb_type(o) == MRB_TT_SYMBOL)
|
193
|
+
#endif
|
154
194
|
#ifndef mrb_undef_p
|
155
195
|
#define mrb_undef_p(o) (mrb_type(o) == MRB_TT_UNDEF)
|
156
196
|
#endif
|
157
197
|
#ifndef mrb_nil_p
|
158
198
|
#define mrb_nil_p(o) (mrb_type(o) == MRB_TT_FALSE && !mrb_fixnum(o))
|
159
199
|
#endif
|
160
|
-
#ifndef
|
161
|
-
#define
|
200
|
+
#ifndef mrb_false_p
|
201
|
+
#define mrb_false_p(o) (mrb_type(o) == MRB_TT_FALSE && !!mrb_fixnum(o))
|
162
202
|
#endif
|
163
|
-
#
|
164
|
-
#define
|
165
|
-
#define MRB_SYMBOL_MAX UINT32_MAX
|
203
|
+
#ifndef mrb_true_p
|
204
|
+
#define mrb_true_p(o) (mrb_type(o) == MRB_TT_TRUE)
|
166
205
|
#endif
|
167
206
|
#ifndef MRB_WITHOUT_FLOAT
|
207
|
+
#ifndef mrb_float_p
|
168
208
|
#define mrb_float_p(o) (mrb_type(o) == MRB_TT_FLOAT)
|
169
209
|
#endif
|
170
|
-
#
|
210
|
+
#endif
|
211
|
+
#ifndef mrb_array_p
|
171
212
|
#define mrb_array_p(o) (mrb_type(o) == MRB_TT_ARRAY)
|
213
|
+
#endif
|
214
|
+
#ifndef mrb_string_p
|
172
215
|
#define mrb_string_p(o) (mrb_type(o) == MRB_TT_STRING)
|
216
|
+
#endif
|
217
|
+
#ifndef mrb_hash_p
|
173
218
|
#define mrb_hash_p(o) (mrb_type(o) == MRB_TT_HASH)
|
219
|
+
#endif
|
220
|
+
#ifndef mrb_cptr_p
|
174
221
|
#define mrb_cptr_p(o) (mrb_type(o) == MRB_TT_CPTR)
|
222
|
+
#endif
|
223
|
+
#ifndef mrb_exception_p
|
175
224
|
#define mrb_exception_p(o) (mrb_type(o) == MRB_TT_EXCEPTION)
|
225
|
+
#endif
|
226
|
+
#ifndef mrb_free_p
|
227
|
+
#define mrb_free_p(o) (mrb_type(o) == MRB_TT_FREE)
|
228
|
+
#endif
|
229
|
+
#ifndef mrb_object_p
|
230
|
+
#define mrb_object_p(o) (mrb_type(o) == MRB_TT_OBJECT)
|
231
|
+
#endif
|
232
|
+
#ifndef mrb_class_p
|
233
|
+
#define mrb_class_p(o) (mrb_type(o) == MRB_TT_CLASS)
|
234
|
+
#endif
|
235
|
+
#ifndef mrb_module_p
|
236
|
+
#define mrb_module_p(o) (mrb_type(o) == MRB_TT_MODULE)
|
237
|
+
#endif
|
238
|
+
#ifndef mrb_iclass_p
|
239
|
+
#define mrb_iclass_p(o) (mrb_type(o) == MRB_TT_ICLASS)
|
240
|
+
#endif
|
241
|
+
#ifndef mrb_sclass_p
|
242
|
+
#define mrb_sclass_p(o) (mrb_type(o) == MRB_TT_SCLASS)
|
243
|
+
#endif
|
244
|
+
#ifndef mrb_proc_p
|
245
|
+
#define mrb_proc_p(o) (mrb_type(o) == MRB_TT_PROC)
|
246
|
+
#endif
|
247
|
+
#ifndef mrb_range_p
|
248
|
+
#define mrb_range_p(o) (mrb_type(o) == MRB_TT_RANGE)
|
249
|
+
#endif
|
250
|
+
#ifndef mrb_file_p
|
251
|
+
#define mrb_file_p(o) (mrb_type(o) == MRB_TT_FILE)
|
252
|
+
#endif
|
253
|
+
#ifndef mrb_env_p
|
254
|
+
#define mrb_env_p(o) (mrb_type(o) == MRB_TT_ENV)
|
255
|
+
#endif
|
256
|
+
#ifndef mrb_data_p
|
257
|
+
#define mrb_data_p(o) (mrb_type(o) == MRB_TT_DATA)
|
258
|
+
#endif
|
259
|
+
#ifndef mrb_fiber_p
|
260
|
+
#define mrb_fiber_p(o) (mrb_type(o) == MRB_TT_FIBER)
|
261
|
+
#endif
|
262
|
+
#ifndef mrb_istruct_p
|
263
|
+
#define mrb_istruct_p(o) (mrb_type(o) == MRB_TT_ISTRUCT)
|
264
|
+
#endif
|
265
|
+
#ifndef mrb_break_p
|
266
|
+
#define mrb_break_p(o) (mrb_type(o) == MRB_TT_BREAK)
|
267
|
+
#endif
|
268
|
+
#ifndef mrb_bool
|
269
|
+
#define mrb_bool(o) (mrb_type(o) != MRB_TT_FALSE)
|
270
|
+
#endif
|
176
271
|
#define mrb_test(o) mrb_bool(o)
|
177
|
-
MRB_API mrb_bool mrb_regexp_p(struct mrb_state*, mrb_value);
|
178
272
|
|
179
|
-
|
273
|
+
/**
|
180
274
|
* Returns a float in Ruby.
|
275
|
+
*
|
276
|
+
* Takes a float and boxes it into an mrb_value
|
181
277
|
*/
|
182
278
|
#ifndef MRB_WITHOUT_FLOAT
|
183
279
|
MRB_INLINE mrb_value mrb_float_value(struct mrb_state *mrb, mrb_float f)
|
@@ -189,7 +285,7 @@ MRB_INLINE mrb_value mrb_float_value(struct mrb_state *mrb, mrb_float f)
|
|
189
285
|
}
|
190
286
|
#endif
|
191
287
|
|
192
|
-
|
288
|
+
MRB_INLINE mrb_value
|
193
289
|
mrb_cptr_value(struct mrb_state *mrb, void *p)
|
194
290
|
{
|
195
291
|
mrb_value v;
|
@@ -198,8 +294,10 @@ mrb_cptr_value(struct mrb_state *mrb, void *p)
|
|
198
294
|
return v;
|
199
295
|
}
|
200
296
|
|
201
|
-
|
297
|
+
/**
|
202
298
|
* Returns a fixnum in Ruby.
|
299
|
+
*
|
300
|
+
* Takes an integer and boxes it into an mrb_value
|
203
301
|
*/
|
204
302
|
MRB_INLINE mrb_value mrb_fixnum_value(mrb_int i)
|
205
303
|
{
|
@@ -208,7 +306,7 @@ MRB_INLINE mrb_value mrb_fixnum_value(mrb_int i)
|
|
208
306
|
return v;
|
209
307
|
}
|
210
308
|
|
211
|
-
|
309
|
+
MRB_INLINE mrb_value
|
212
310
|
mrb_symbol_value(mrb_sym i)
|
213
311
|
{
|
214
312
|
mrb_value v;
|
@@ -216,7 +314,7 @@ mrb_symbol_value(mrb_sym i)
|
|
216
314
|
return v;
|
217
315
|
}
|
218
316
|
|
219
|
-
|
317
|
+
MRB_INLINE mrb_value
|
220
318
|
mrb_obj_value(void *p)
|
221
319
|
{
|
222
320
|
mrb_value v;
|
@@ -226,8 +324,7 @@ mrb_obj_value(void *p)
|
|
226
324
|
return v;
|
227
325
|
}
|
228
326
|
|
229
|
-
|
230
|
-
/*
|
327
|
+
/**
|
231
328
|
* Get a nil mrb_value object.
|
232
329
|
*
|
233
330
|
* @return
|
@@ -240,7 +337,7 @@ MRB_INLINE mrb_value mrb_nil_value(void)
|
|
240
337
|
return v;
|
241
338
|
}
|
242
339
|
|
243
|
-
|
340
|
+
/**
|
244
341
|
* Returns false in Ruby.
|
245
342
|
*/
|
246
343
|
MRB_INLINE mrb_value mrb_false_value(void)
|
@@ -250,7 +347,7 @@ MRB_INLINE mrb_value mrb_false_value(void)
|
|
250
347
|
return v;
|
251
348
|
}
|
252
349
|
|
253
|
-
|
350
|
+
/**
|
254
351
|
* Returns true in Ruby.
|
255
352
|
*/
|
256
353
|
MRB_INLINE mrb_value mrb_true_value(void)
|
@@ -260,7 +357,7 @@ MRB_INLINE mrb_value mrb_true_value(void)
|
|
260
357
|
return v;
|
261
358
|
}
|
262
359
|
|
263
|
-
|
360
|
+
MRB_INLINE mrb_value
|
264
361
|
mrb_bool_value(mrb_bool boolean)
|
265
362
|
{
|
266
363
|
mrb_value v;
|
@@ -268,7 +365,7 @@ mrb_bool_value(mrb_bool boolean)
|
|
268
365
|
return v;
|
269
366
|
}
|
270
367
|
|
271
|
-
|
368
|
+
MRB_INLINE mrb_value
|
272
369
|
mrb_undef_value(void)
|
273
370
|
{
|
274
371
|
mrb_value v;
|
@@ -276,34 +373,25 @@ mrb_undef_value(void)
|
|
276
373
|
return v;
|
277
374
|
}
|
278
375
|
|
279
|
-
#
|
280
|
-
#
|
281
|
-
#
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
return (const char*)get_etext() < p && p < (const char*)get_edata();
|
286
|
-
}
|
287
|
-
#else
|
288
|
-
extern char _etext[];
|
289
|
-
#ifdef MRB_NO_INIT_ARRAY_START
|
290
|
-
extern char _edata[];
|
376
|
+
#if defined(MRB_USE_ETEXT_EDATA) && !defined(MRB_USE_LINK_TIME_RO_DATA_P)
|
377
|
+
# ifdef __GNUC__
|
378
|
+
# warning MRB_USE_ETEXT_EDATA is deprecated. Define MRB_USE_LINK_TIME_RO_DATA_P instead.
|
379
|
+
# endif
|
380
|
+
# define MRB_USE_LINK_TIME_RO_DATA_P
|
381
|
+
#endif
|
291
382
|
|
292
|
-
|
293
|
-
mrb_ro_data_p(
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
#else
|
383
|
+
#if defined(MRB_USE_CUSTOM_RO_DATA_P)
|
384
|
+
/* If you define `MRB_USE_CUSTOM_RO_DATA_P`, you must implement `mrb_ro_data_p()`. */
|
385
|
+
mrb_bool mrb_ro_data_p(const char *p);
|
386
|
+
#elif defined(MRB_USE_LINK_TIME_RO_DATA_P)
|
387
|
+
extern char __ehdr_start[];
|
298
388
|
extern char __init_array_start[];
|
299
389
|
|
300
390
|
static inline mrb_bool
|
301
391
|
mrb_ro_data_p(const char *p)
|
302
392
|
{
|
303
|
-
return
|
393
|
+
return __ehdr_start < p && p < __init_array_start;
|
304
394
|
}
|
305
|
-
#endif
|
306
|
-
#endif
|
307
395
|
#else
|
308
396
|
# define mrb_ro_data_p(p) FALSE
|
309
397
|
#endif
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
** mruby/variable.h - mruby variables
|
1
|
+
/**
|
2
|
+
** @file mruby/variable.h - mruby variables
|
3
3
|
**
|
4
4
|
** See Copyright Notice in mruby.h
|
5
5
|
*/
|
@@ -97,18 +97,15 @@ MRB_API void mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value val);
|
|
97
97
|
*
|
98
98
|
* Example:
|
99
99
|
*
|
100
|
-
* !!!ruby
|
101
100
|
* # Ruby style
|
102
101
|
* $value = nil
|
103
102
|
*
|
104
|
-
* !!!c
|
105
103
|
* // C style
|
106
104
|
* mrb_sym sym = mrb_intern_lit(mrb, "$value");
|
107
105
|
* mrb_gv_remove(mrb, sym);
|
108
106
|
*
|
109
107
|
* @param mrb The mruby state reference
|
110
108
|
* @param sym The name of the global variable
|
111
|
-
* @param val The value of the global variable
|
112
109
|
*/
|
113
110
|
MRB_API void mrb_gv_remove(mrb_state *mrb, mrb_sym sym);
|
114
111
|
|
@@ -117,6 +114,7 @@ MRB_API void mrb_mod_cv_set(mrb_state *mrb, struct RClass * c, mrb_sym sym, mrb_
|
|
117
114
|
MRB_API void mrb_cv_set(mrb_state *mrb, mrb_value mod, mrb_sym sym, mrb_value v);
|
118
115
|
MRB_API mrb_bool mrb_cv_defined(mrb_state *mrb, mrb_value mod, mrb_sym sym);
|
119
116
|
mrb_value mrb_obj_iv_inspect(mrb_state*, struct RObject*);
|
117
|
+
void mrb_obj_iv_set_force(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v);
|
120
118
|
mrb_value mrb_mod_constants(mrb_state *mrb, mrb_value mod);
|
121
119
|
mrb_value mrb_f_global_variables(mrb_state *mrb, mrb_value self);
|
122
120
|
mrb_value mrb_obj_instance_variables(mrb_state*, mrb_value);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
** mruby/version.h - mruby version definition
|
1
|
+
/**
|
2
|
+
** @file mruby/version.h - mruby version definition
|
3
3
|
**
|
4
4
|
** See Copyright Notice in mruby.h
|
5
5
|
*/
|
@@ -42,12 +42,12 @@ MRB_BEGIN_DECL
|
|
42
42
|
/*
|
43
43
|
* Minor release version number.
|
44
44
|
*/
|
45
|
-
#define MRUBY_RELEASE_MINOR
|
45
|
+
#define MRUBY_RELEASE_MINOR 1
|
46
46
|
|
47
47
|
/*
|
48
48
|
* Tiny release version number.
|
49
49
|
*/
|
50
|
-
#define MRUBY_RELEASE_TEENY
|
50
|
+
#define MRUBY_RELEASE_TEENY 0
|
51
51
|
|
52
52
|
/*
|
53
53
|
* The mruby version.
|
@@ -67,17 +67,31 @@ MRB_BEGIN_DECL
|
|
67
67
|
/*
|
68
68
|
* Release month.
|
69
69
|
*/
|
70
|
-
#define MRUBY_RELEASE_MONTH
|
70
|
+
#define MRUBY_RELEASE_MONTH 11
|
71
71
|
|
72
72
|
/*
|
73
73
|
* Release day.
|
74
74
|
*/
|
75
|
-
#define MRUBY_RELEASE_DAY
|
75
|
+
#define MRUBY_RELEASE_DAY 19
|
76
76
|
|
77
77
|
/*
|
78
78
|
* Release date as a string.
|
79
79
|
*/
|
80
|
-
#define MRUBY_RELEASE_DATE
|
80
|
+
#define MRUBY_RELEASE_DATE \
|
81
|
+
MRUBY_RELEASE_YEAR_STR "-" \
|
82
|
+
MRUBY_RELEASE_MONTH_STR "-" \
|
83
|
+
MRUBY_RELEASE_DAY_STR
|
84
|
+
#define MRUBY_RELEASE_YEAR_STR MRB_STRINGIZE(MRUBY_RELEASE_YEAR)
|
85
|
+
#if MRUBY_RELEASE_MONTH < 10
|
86
|
+
#define MRUBY_RELEASE_MONTH_STR "0" MRB_STRINGIZE(MRUBY_RELEASE_MONTH)
|
87
|
+
#else
|
88
|
+
#define MRUBY_RELEASE_MONTH_STR MRB_STRINGIZE(MRUBY_RELEASE_MONTH)
|
89
|
+
#endif
|
90
|
+
#if MRUBY_RELEASE_DAY < 10
|
91
|
+
#define MRUBY_RELEASE_DAY_STR "0" MRB_STRINGIZE(MRUBY_RELEASE_DAY)
|
92
|
+
#else
|
93
|
+
#define MRUBY_RELEASE_DAY_STR MRB_STRINGIZE(MRUBY_RELEASE_DAY)
|
94
|
+
#endif
|
81
95
|
|
82
96
|
/*
|
83
97
|
* The year mruby was first created.
|
@@ -92,9 +106,9 @@ MRB_BEGIN_DECL
|
|
92
106
|
/*
|
93
107
|
* mruby's version, and release date.
|
94
108
|
*/
|
95
|
-
#define MRUBY_DESCRIPTION
|
96
|
-
"mruby " MRUBY_VERSION
|
97
|
-
" (" MRUBY_RELEASE_DATE ")
|
109
|
+
#define MRUBY_DESCRIPTION \
|
110
|
+
"mruby " MRUBY_VERSION \
|
111
|
+
" (" MRUBY_RELEASE_DATE ")" \
|
98
112
|
|
99
113
|
/*
|
100
114
|
* mruby's copyright information.
|