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.
Files changed (381) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +8 -6
  4. data/.ruby-version +1 -1
  5. data/Gemfile +2 -1
  6. data/bin/sandbox +1 -1
  7. data/ext/enterprise_script_service/Rakefile +1 -1
  8. data/ext/enterprise_script_service/flags.rb +5 -0
  9. data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
  10. data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
  11. data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
  12. data/ext/enterprise_script_service/libseccomp/README.md +1 -1
  13. data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
  14. data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
  15. data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
  16. data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
  17. data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
  18. data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
  19. data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
  20. data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
  21. data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
  22. data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
  23. data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
  24. data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
  25. data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
  26. data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
  27. data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
  28. data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
  29. data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
  30. data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
  31. data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
  32. data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
  33. data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
  34. data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
  35. data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
  36. data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
  37. data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
  38. data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
  39. data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
  40. data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
  41. data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
  42. data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
  43. data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
  44. data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
  45. data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
  46. data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
  47. data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
  48. data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
  49. data/ext/enterprise_script_service/mruby/.gitignore +2 -2
  50. data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
  51. data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
  52. data/ext/enterprise_script_service/mruby/README.md +21 -8
  53. data/ext/enterprise_script_service/mruby/Rakefile +4 -13
  54. data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
  55. data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
  56. data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
  57. data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
  58. data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
  59. data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
  60. data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
  61. data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
  62. data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
  63. data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
  64. data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
  65. data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
  66. data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
  67. data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
  68. data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
  69. data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
  70. data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
  71. data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
  72. data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
  73. data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
  74. data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
  75. data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
  76. data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
  77. data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
  78. data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
  79. data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
  80. data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
  81. data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
  82. data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
  83. data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
  84. data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
  85. data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
  86. data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
  87. data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
  88. data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
  89. data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
  90. data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
  91. data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
  92. data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
  93. data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
  94. data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
  95. data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
  96. data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
  97. data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
  98. data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
  99. data/ext/enterprise_script_service/mruby/minirake +27 -11
  100. data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
  101. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
  102. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
  103. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
  104. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
  105. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
  106. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
  107. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
  108. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
  109. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
  110. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
  111. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
  112. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
  113. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
  114. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
  115. data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
  116. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
  117. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
  118. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
  119. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
  120. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
  121. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
  122. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
  123. data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
  124. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
  125. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
  126. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
  127. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
  128. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
  129. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
  130. data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
  131. data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
  132. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
  133. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
  134. data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
  135. data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
  136. data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
  137. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
  138. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
  139. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
  140. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
  141. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
  142. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
  143. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
  144. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
  145. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
  146. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
  147. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
  148. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
  149. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
  150. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
  151. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
  152. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
  153. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
  154. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
  155. data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
  156. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
  157. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
  158. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
  159. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
  160. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
  161. data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
  162. data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
  163. data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
  164. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
  165. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
  166. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
  167. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
  168. data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
  169. data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
  170. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
  171. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
  172. data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
  173. data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
  174. data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
  175. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
  176. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
  177. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
  178. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
  179. data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
  180. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
  181. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
  182. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
  183. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
  184. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
  185. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
  186. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
  187. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
  188. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
  189. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
  190. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
  191. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
  192. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
  193. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
  194. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
  195. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
  196. data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
  197. data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
  198. data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
  199. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
  200. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
  201. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
  202. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
  203. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
  204. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
  205. data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
  206. data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
  207. data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
  208. data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
  209. data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
  210. data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
  211. data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
  212. data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
  213. data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
  214. data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
  215. data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
  216. data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
  217. data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
  218. data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
  219. data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
  220. data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
  221. data/ext/enterprise_script_service/mruby/src/array.c +95 -46
  222. data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
  223. data/ext/enterprise_script_service/mruby/src/class.c +370 -278
  224. data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
  225. data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
  226. data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
  227. data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
  228. data/ext/enterprise_script_service/mruby/src/error.c +157 -55
  229. data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
  230. data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
  231. data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
  232. data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
  233. data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
  234. data/ext/enterprise_script_service/mruby/src/load.c +40 -76
  235. data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
  236. data/ext/enterprise_script_service/mruby/src/object.c +16 -39
  237. data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
  238. data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
  239. data/ext/enterprise_script_service/mruby/src/range.c +22 -35
  240. data/ext/enterprise_script_service/mruby/src/state.c +5 -94
  241. data/ext/enterprise_script_service/mruby/src/string.c +874 -710
  242. data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
  243. data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
  244. data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
  245. data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
  246. data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
  247. data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
  248. data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
  249. data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
  250. data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
  251. data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
  252. data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
  253. data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
  254. data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
  255. data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
  256. data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
  257. data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
  258. data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
  259. data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
  260. data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
  261. data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
  262. data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
  263. data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
  264. data/ext/enterprise_script_service/mruby_config.rb +10 -0
  265. data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
  266. data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
  267. data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
  268. data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
  269. data/ext/enterprise_script_service/msgpack/README.md +1 -1
  270. data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
  271. data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
  272. data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
  273. data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
  274. data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
  275. data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
  276. data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
  277. data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
  278. data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
  279. data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
  280. data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
  281. data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
  282. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
  283. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
  284. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
  285. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
  286. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
  287. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
  288. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
  289. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
  290. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
  291. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
  292. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
  293. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
  294. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
  295. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
  296. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
  297. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
  298. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
  299. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
  300. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
  301. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
  302. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
  303. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
  304. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
  305. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
  306. data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
  307. data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
  308. data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
  309. data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
  310. data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
  311. data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
  312. data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
  313. data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
  314. data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
  315. data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
  316. data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
  317. data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
  318. data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
  319. data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
  320. data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
  321. data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
  322. data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
  323. data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
  324. data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
  325. data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
  326. data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
  327. data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
  328. data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
  329. data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
  330. data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
  331. data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
  332. data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
  333. data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
  334. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
  335. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
  336. data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
  337. data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
  338. data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
  339. data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
  340. data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
  341. data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
  342. data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
  343. data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
  344. data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
  345. data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
  346. data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
  347. data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
  348. data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
  349. data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
  350. data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
  351. data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
  352. data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
  353. data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
  354. data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
  355. data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
  356. data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
  357. data/lib/script_core/version.rb +1 -1
  358. data/lib/tasks/mruby/engine.gembox.example +1 -0
  359. data/lib/tasks/script_core.rake +21 -3
  360. data/spec/dummy/app/helpers/fields_helper.rb +2 -2
  361. data/spec/dummy/mruby/engine.gembox +1 -0
  362. data/spec/script_core_spec.rb +1 -1
  363. metadata +38 -22
  364. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
  365. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
  366. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
  367. data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
  368. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
  369. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
  370. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
  371. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
  372. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
  373. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
  374. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
  375. data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
  376. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
  377. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
  378. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
  379. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
  380. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
  381. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/run_test.rb +0 -28
@@ -3,7 +3,7 @@
3
3
  ## What is mruby
4
4
 
5
5
  mruby is the lightweight implementation of the Ruby language complying to (part
6
- of) the [ISO standard][ISO-standard]. Its syntax is Ruby 1.9 compatible.
6
+ of) the [ISO standard][ISO-standard]. Its syntax is Ruby 2.x compatible.
7
7
 
8
8
  mruby can be linked and embedded within your application. We provide the
9
9
  interpreter program "mruby" and the interactive mruby shell "mirb" as examples.
@@ -17,7 +17,7 @@ of the Ministry of Economy, Trade and Industry of Japan.
17
17
 
18
18
  ## How to get mruby
19
19
 
20
- The stable version 2.0.1 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.0.1.zip](https://github.com/mruby/mruby/archive/2.0.1.zip)
20
+ The stable version 2.1.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.1.0.zip](https://github.com/mruby/mruby/archive/2.1.0.zip)
21
21
 
22
22
  The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master)
23
23
 
@@ -30,7 +30,7 @@ You can also install and compile mruby using [ruby-install](https://github.com/p
30
30
 
31
31
  ## mruby home-page
32
32
 
33
- The URL of the mruby home-page is: [http://www.mruby.org](http://www.mruby.org).
33
+ The URL of the mruby home-page is: https://mruby.org.
34
34
 
35
35
  ## Mailing list
36
36
 
@@ -38,7 +38,7 @@ We don't have a mailing list, but you can use [GitHub issues](https://github.com
38
38
 
39
39
  ## How to compile and install (mruby and gems)
40
40
 
41
- See the [doc/guides/compile.md](doc/guides/compile.md) file.
41
+ See the [compile.md](https://github.com/mruby/mruby/blob/master/doc/guides/compile.md) file.
42
42
 
43
43
  ## Running Tests
44
44
 
@@ -50,16 +50,29 @@ Or
50
50
 
51
51
  $ ruby ./minirake test
52
52
 
53
+ ## Building documentation
54
+
55
+ There are two sets of documentation in mruby: the mruby API (generated by yard) and C API (Doxygen)
56
+
57
+ To build both of them, simply go
58
+
59
+ rake doc
60
+
61
+ You can also view them in your browser
62
+
63
+ rake view_api
64
+ rake view_capi
65
+
53
66
  ## How to customize mruby (mrbgems)
54
67
 
55
68
  mruby contains a package manager called *mrbgems*. To create extensions
56
69
  in C and/or Ruby you should create a *GEM*. For a documentation of how to
57
- use mrbgems consult the file [doc/guides/mrbgems.md](doc/guides/mrbgems.md). For example code of
58
- how to use mrbgems look into the folder *examples/mrbgems/*.
70
+ use mrbgems consult the file [mrbgems.md](https://github.com/mruby/mruby/blob/master/doc/guides/mrbgems.md).
71
+ For example code of how to use mrbgems look into the folder *examples/mrbgems/*.
59
72
 
60
73
  ## License
61
74
 
62
- mruby is released under the [MIT License](LICENSE).
75
+ mruby is released under the [MIT License](https://github.com/mruby/mruby/blob/master/LICENSE).
63
76
 
64
77
  ## Note for License
65
78
 
@@ -88,5 +101,5 @@ file in your pull request.
88
101
 
89
102
  [ISO-standard]: http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579
90
103
  [build-status-img]: https://travis-ci.org/mruby/mruby.svg?branch=master
91
- [contribution-guidelines]: CONTRIBUTING.md
104
+ [contribution-guidelines]: https://github.com/mruby/mruby/blob/master/CONTRIBUTING.md
92
105
  [travis-ci]: https://travis-ci.org/mruby/mruby
@@ -10,7 +10,6 @@ $LOAD_PATH << File.join(MRUBY_ROOT, "lib")
10
10
  # load build systems
11
11
  require "mruby-core-ext"
12
12
  require "mruby/build"
13
- require "mruby/gem"
14
13
 
15
14
  # load configuration file
16
15
  MRUBY_CONFIG = (ENV['MRUBY_CONFIG'] && ENV['MRUBY_CONFIG'] != '') ? ENV['MRUBY_CONFIG'] : "#{MRUBY_ROOT}/build_config.rb"
@@ -31,6 +30,7 @@ load "#{MRUBY_ROOT}/tasks/libmruby.rake"
31
30
  load "#{MRUBY_ROOT}/tasks/benchmark.rake"
32
31
 
33
32
  load "#{MRUBY_ROOT}/tasks/gitlab.rake"
33
+ load "#{MRUBY_ROOT}/tasks/doc.rake"
34
34
 
35
35
  def install_D(src, dst)
36
36
  opts = { :verbose => $verbose }
@@ -62,7 +62,7 @@ MRuby.each_target do |target|
62
62
  relative_from_root = gem.dir.relative_path_from(MRUBY_ROOT)
63
63
  current_build_dir = File.expand_path "#{build_dir}/#{relative_from_root}"
64
64
 
65
- if current_build_dir !~ /^#{build_dir}/
65
+ if current_build_dir !~ /^#{Regexp.escape(build_dir)}/
66
66
  current_build_dir = "#{build_dir}/mrbgems/#{gem.name}"
67
67
  end
68
68
 
@@ -118,6 +118,7 @@ task :all => depfiles do
118
118
  MRuby.each_target do
119
119
  print_build_summary
120
120
  end
121
+ MRuby::Lockfile.write
121
122
  end
122
123
 
123
124
  desc "run all mruby tests"
@@ -150,19 +151,9 @@ task :clean do
150
151
  end
151
152
 
152
153
  desc "clean everything!"
153
- task :deep_clean => ["clean"] do
154
+ task :deep_clean => ["clean", "clean_doc"] do
154
155
  MRuby.each_target do |t|
155
156
  FileUtils.rm_rf t.gem_clone_dir, { :verbose => $verbose }
156
157
  end
157
158
  puts "Cleaned up mrbgems build folder"
158
159
  end
159
-
160
- desc 'generate document'
161
- task :doc do
162
- begin
163
- sh "mrbdoc"
164
- rescue
165
- puts "ERROR: To generate documents, you should install yard-mruby gem."
166
- puts " $ gem install yard-mruby"
167
- end
168
- end
@@ -17,7 +17,7 @@
17
17
 
18
18
  # include all core GEMs
19
19
  conf.gembox 'full-core'
20
- conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK)
20
+ conf.cc.defines += %w(MRB_ENABLE_DEBUG_HOOK)
21
21
 
22
22
  conf.enable_test
23
23
  end
@@ -18,9 +18,9 @@
18
18
  # end
19
19
  # conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
20
20
  # conf.gem :core => 'mruby-eval'
21
- # conf.gem :mgem => 'mruby-io'
22
- # conf.gem :github => 'iij/mruby-io'
23
- # conf.gem :git => 'git@github.com:iij/mruby-io.git', :branch => 'master', :options => '-v'
21
+ # conf.gem :mgem => 'mruby-onig-regexp'
22
+ # conf.gem :github => 'mattn/mruby-onig-regexp'
23
+ # conf.gem :git => 'git@github.com:mattn/mruby-onig-regexp.git', :branch => 'master', :options => '-v'
24
24
 
25
25
  # include the default GEMs
26
26
  conf.gembox 'default'
@@ -6,11 +6,11 @@ binaries.
6
6
  ## Prerequisites
7
7
 
8
8
  To compile mruby out of the source code you need the following tools:
9
- * C Compiler (i.e. ```gcc```)
10
- * Linker (i.e. ```gcc```)
11
- * Archive utility (i.e. ```ar```)
12
- * Parser generator (i.e. ```bison```)
13
- * Ruby 1.8 or 1.9 (i.e. ```ruby``` or ```jruby```)
9
+ * C Compiler (e.g. `gcc`)
10
+ * Linker (e.g. `gcc`)
11
+ * Archive utility (e.g. `ar`)
12
+ * Parser generator (e.g. `bison`)
13
+ * Ruby 2.0 or later (e.g. `ruby` or `jruby`)
14
14
 
15
15
  Optional:
16
16
  * GIT (to update mruby source and integrate mrbgems easier)
@@ -32,10 +32,10 @@ All tools necessary to compile mruby can be set or modified here. In case
32
32
  you want to maintain an additional *build_config.rb* you can define a
33
33
  customized path using the *$MRUBY_CONFIG* environment variable.
34
34
 
35
- To compile just call ```./minirake``` inside of the mruby source root. To
36
- generate and execute the test tools call ```./minirake test```. To clean
37
- all build files call ```./minirake clean```. To see full command line on
38
- build, call ```./minirake -v```.
35
+ To compile just call `./minirake` inside of the mruby source root. To
36
+ generate and execute the test tools call `./minirake test`. To clean
37
+ all build files call `./minirake clean`. To see full command line on
38
+ build, call `./minirake -v`.
39
39
 
40
40
  ## Build Configuration
41
41
 
@@ -79,7 +79,7 @@ toolchain :android
79
79
  ```
80
80
 
81
81
  Requires the custom standalone Android NDK and the toolchain path
82
- in ```ANDROID_STANDALONE_TOOLCHAIN```.
82
+ in `ANDROID_STANDALONE_TOOLCHAIN`.
83
83
 
84
84
  ### Binaries
85
85
 
@@ -97,7 +97,7 @@ conf.gem "#{root}/mrbgems/mruby-bin-mirb"
97
97
  ### File Separator
98
98
 
99
99
  Some environments require a different file separator character. It is possible to
100
- set the character via ```conf.file_separator```.
100
+ set the character via `conf.file_separator`.
101
101
  ```ruby
102
102
  conf.file_separator = '/'
103
103
  ```
@@ -119,7 +119,7 @@ end
119
119
 
120
120
  C Compiler has header searcher to detect installed library.
121
121
 
122
- If you need a include path of header file use ```search_header_path```:
122
+ If you need a include path of header file use `search_header_path`:
123
123
  ```ruby
124
124
  # Searches ```iconv.h```.
125
125
  # If found it will return include path of the header file.
@@ -127,7 +127,7 @@ If you need a include path of header file use ```search_header_path```:
127
127
  fail 'iconv.h not found' unless conf.cc.search_header_path 'iconv.h'
128
128
  ```
129
129
 
130
- If you need a full file name of header file use ```search_header```:
130
+ If you need a full file name of header file use `search_header`:
131
131
  ```ruby
132
132
  # Searches ```iconv.h```.
133
133
  # If found it will return full path of the header file.
@@ -136,11 +136,11 @@ iconv_h = conf.cc.search_header 'iconv.h'
136
136
  print "iconv.h found: #{iconv_h}\n"
137
137
  ```
138
138
 
139
- Header searcher uses compiler's ```include_paths``` by default.
139
+ Header searcher uses compiler's `include_paths` by default.
140
140
  When you are using GCC toolchain (including clang toolchain since its base is gcc toolchain)
141
- it will use compiler specific include paths too. (For example ```/usr/local/include```, ```/usr/include```)
141
+ it will use compiler specific include paths too. (For example `/usr/local/include`, `/usr/include`)
142
142
 
143
- If you need a special header search paths define a singleton method ```header_search_paths``` to C compiler:
143
+ If you need a special header search paths define a singleton method `header_search_paths` to C compiler:
144
144
  ```ruby
145
145
  def conf.cc.header_search_paths
146
146
  ['/opt/local/include'] + include_paths
@@ -222,7 +222,7 @@ See doc/mrbgems/README.md for more option about mrbgems.
222
222
 
223
223
  Configuration Mrbtest build process.
224
224
 
225
- If you want mrbtest.a only, You should set ```conf.build_mrbtest_lib_only```
225
+ If you want mrbtest.a only, You should set `conf.build_mrbtest_lib_only`
226
226
  ```ruby
227
227
  conf.build_mrbtest_lib_only
228
228
  ```
@@ -230,9 +230,9 @@ conf.build_mrbtest_lib_only
230
230
  ### Bintest
231
231
 
232
232
  Tests for mrbgem tools using CRuby.
233
- To have bintests place \*.rb scripts to ```bintest/``` directory of mrbgems.
234
- See ```mruby-bin-*/bintest/*.rb``` if you need examples.
235
- If you want a temporary files use `tempfile` module of CRuby instead of ```/tmp/```.
233
+ To have bintests place \*.rb scripts to `bintest/` directory of mrbgems.
234
+ See `mruby-bin-*/bintest/*.rb` if you need examples.
235
+ If you want a temporary files use `tempfile` module of CRuby instead of `/tmp/`.
236
236
 
237
237
  You can enable it with following:
238
238
  ```ruby
@@ -247,8 +247,8 @@ correctly. To support mrbgems written in C++, mruby can be
247
247
  configured to use C++ exception.
248
248
 
249
249
  There are two levels of C++ exception handling. The one is
250
- ```enable_cxx_exception``` that enables C++ exception, but
251
- uses C ABI. The other is ```enable_cxx_abi``` where all
250
+ `enable_cxx_exception` that enables C++ exception, but
251
+ uses C ABI. The other is `enable_cxx_abi` where all
252
252
  files are compiled by C++ compiler.
253
253
 
254
254
  When you mix C++ code, C++ exception would be enabled automatically.
@@ -266,7 +266,7 @@ C++ exception, add following:
266
266
  conf.disable_cxx_exception
267
267
  ```
268
268
  and you will get an error when you try to use C++ gem.
269
- Note that it must be called before ```enable_cxx_exception``` or ```gem``` method.
269
+ Note that it must be called before `enable_cxx_exception` or `gem` method.
270
270
 
271
271
  ### Debugging mode
272
272
 
@@ -276,17 +276,17 @@ conf.enable_debug
276
276
  ```
277
277
 
278
278
  When debugging mode is enabled
279
- * Macro ```MRB_DEBUG``` would be defined.
280
- * Which means ```mrb_assert()``` macro is enabled.
281
- * Debug information of irep would be generated by ```mrbc```.
282
- * Because ```-g``` flag would be added to ```mrbc``` runner.
279
+ * Macro `MRB_DEBUG` would be defined.
280
+ * Which means `mrb_assert()` macro is enabled.
281
+ * Debug information of irep would be generated by `mrbc`.
282
+ * Because `-g` flag would be added to `mrbc` runner.
283
283
  * You can have better backtrace of mruby scripts with this.
284
284
 
285
285
  ## Cross-Compilation
286
286
 
287
287
  mruby can also be cross-compiled from one platform to another. To
288
288
  achieve this the *build_config.rb* needs to contain an instance of
289
- ```MRuby::CrossBuild```. This instance defines the compilation
289
+ `MRuby::CrossBuild`. This instance defines the compilation
290
290
  tools and flags for the target platform. An example could look
291
291
  like this:
292
292
  ```ruby
@@ -298,12 +298,12 @@ MRuby::CrossBuild.new('32bit') do |conf|
298
298
  end
299
299
  ```
300
300
 
301
- All configuration options of ```MRuby::Build``` can also be used
302
- in ```MRuby::CrossBuild```.
301
+ All configuration options of `MRuby::Build` can also be used
302
+ in `MRuby::CrossBuild`.
303
303
 
304
304
  ### Mrbtest in Cross-Compilation
305
305
 
306
- In cross compilation, you can run ```mrbtest``` on emulator if
306
+ In cross compilation, you can run `mrbtest` on emulator if
307
307
  you have it by changing configuration of test runner.
308
308
  ```ruby
309
309
  conf.test_runner do |t|
@@ -350,15 +350,15 @@ in *build/host/src*)
350
350
  result will be stored in *build/host/src/y.tab.c*)
351
351
  * compile *build/host/src/y.tab.c* to *build/host/src/y.tab.o*
352
352
  * create *build/host/lib/libmruby_core.a* out of all object files (C only)
353
- * create ```build/host/bin/mrbc``` by compiling *tools/mrbc/mrbc.c* and
353
+ * create `build/host/bin/mrbc` by compiling *tools/mrbc/mrbc.c* and
354
354
  linking with *build/host/lib/libmruby_core.a*
355
355
  * create *build/host/mrblib/mrblib.c* by compiling all \*.rb files
356
- under *mrblib* with ```build/host/bin/mrbc```
356
+ under *mrblib* with `build/host/bin/mrbc`
357
357
  * compile *build/host/mrblib/mrblib.c* to *build/host/mrblib/mrblib.o*
358
358
  * create *build/host/lib/libmruby.a* out of all object files (C and Ruby)
359
- * create ```build/host/bin/mruby``` by compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
359
+ * create `build/host/bin/mruby` by compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
360
360
  linking with *build/host/lib/libmruby.a*
361
- * create ```build/host/bin/mirb``` by compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
361
+ * create `build/host/bin/mirb` by compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
362
362
  linking with *build/host/lib/libmruby.a*
363
363
 
364
364
  ```
@@ -427,15 +427,15 @@ in *build/i386/src*)
427
427
  result will be stored in *build/i386/src/y.tab.c*)
428
428
  * cross-compile *build/i386/src/y.tab.c* to *build/i386/src/y.tab.o*
429
429
  * create *build/i386/mrblib/mrblib.c* by compiling all \*.rb files
430
- under *mrblib* with the native ```build/host/bin/mrbc```
430
+ under *mrblib* with the native `build/host/bin/mrbc`
431
431
  * cross-compile *build/host/mrblib/mrblib.c* to *build/host/mrblib/mrblib.o*
432
432
  * create *build/i386/lib/libmruby.a* out of all object files (C and Ruby)
433
- * create ```build/i386/bin/mruby``` by cross-compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
433
+ * create `build/i386/bin/mruby` by cross-compiling *mrbgems/mruby-bin-mruby/tools/mruby/mruby.c* and
434
434
  linking with *build/i386/lib/libmruby.a*
435
- * create ```build/i386/bin/mirb``` by cross-compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
435
+ * create `build/i386/bin/mirb` by cross-compiling *mrbgems/mruby-bin-mirb/tools/mirb/mirb.c* and
436
436
  linking with *build/i386/lib/libmruby.a*
437
437
  * create *build/i386/lib/libmruby_core.a* out of all object files (C only)
438
- * create ```build/i386/bin/mrbc``` by cross-compiling *tools/mrbc/mrbc.c* and
438
+ * create `build/i386/bin/mrbc` by cross-compiling *tools/mrbc/mrbc.c* and
439
439
  linking with *build/i386/lib/libmruby_core.a*
440
440
 
441
441
  ```
@@ -463,7 +463,7 @@ linking with *build/i386/lib/libmruby_core.a*
463
463
  ### Minimal Library
464
464
 
465
465
  To build a minimal mruby library you need to use the Cross Compiling
466
- feature due to the reason that there are functions (i.e. stdio) which
466
+ feature due to the reason that there are functions (e.g. stdio) which
467
467
  can't be disabled for the main build.
468
468
 
469
469
  ```ruby
@@ -477,12 +477,12 @@ end
477
477
 
478
478
  This configuration defines a cross compile build called 'Minimal' which
479
479
  is using the GCC and compiles for the host machine. It also disables
480
- all usages of stdio and doesn't compile any binaries (i.e. mrbc).
480
+ all usages of stdio and doesn't compile any binaries (e.g. mrbc).
481
481
 
482
482
  ## Test Environment
483
483
 
484
484
  mruby's build process includes a test environment. In case you start the testing
485
- of mruby, a native binary called ```mrbtest``` will be generated and executed.
485
+ of mruby, a native binary called `mrbtest` will be generated and executed.
486
486
  This binary contains all test cases which are defined under *test/t*. In case
487
487
  of a cross-compilation an additional cross-compiled *mrbtest* binary is
488
488
  generated. You can copy this binary and run on your target system.
@@ -38,7 +38,7 @@ To confirm mrdb was installed properly, run mrdb with the `--version` option:
38
38
 
39
39
  ```bash
40
40
  $ mrdb --version
41
- mruby 2.0.1 (2019-4-4)
41
+ mruby 2.1.0 (2019-11-19)
42
42
  ```
43
43
 
44
44
  ## 2.2 Basic Operation
@@ -50,15 +50,21 @@ You can use mrbconfs with following ways:
50
50
  * When defined single precision floating point type(C type `float`) is used as `mrb_float`.
51
51
  * Else double precision floating point type(C type `double`) is used as `mrb_float`.
52
52
 
53
+ `MRB_WITHOUT_FLOAT`
54
+ * When defined removes floating point numbers from mruby.
55
+ * It makes mruby easier to handle in "Microcontroller without FPU" and "Kernel Space".
56
+
53
57
  `MRB_INT16`
54
58
  * When defined `int16_t` will be defined as `mrb_int`.
55
- * Conflicts with `MRB_INT64`.
59
+ * Conflicts with `MRB_INT32` and `MRB_INT64`.
60
+
61
+ `MRB_INT32`
62
+ * When defined, or both `MRB_INT16` and `MRB_INT64` are not defined on 32-bit CPU mode, `int32_t` will be defined as `mrb_int`.
63
+ * Conflicts with `MRB_INT16` and `MRB_INT64`.
56
64
 
57
65
  `MRB_INT64`
58
- * When defined `int64_t` will be defined as `mrb_int`.
59
- * Conflicts with `MRB_INT16`.
60
- * When `MRB_INT16` or `MRB_INT64` isn't defined `int`(most of the times 32-bit integer)
61
- will be defined as `mrb_int`.
66
+ * When defined, or both `MRB_INT16` and `MRB_INT32` are not defined on 64-bit CPU mode, `int64_t` will be defined as `mrb_int`.
67
+ * Conflicts with `MRB_INT16` and `MRB_INT32`.
62
68
 
63
69
  ## Garbage collector configuration.
64
70
 
@@ -115,7 +121,7 @@ largest value of required alignment.
115
121
 
116
122
  `MRB_NAN_BOXING`
117
123
  * If defined represent `mrb_value` in boxed `double`.
118
- * Conflicts with `MRB_USE_FLOAT`.
124
+ * Conflicts with `MRB_USE_FLOAT` and `MRB_WITHOUT_FLOAT`.
119
125
 
120
126
  `MRB_WORD_BOXING`
121
127
  * If defined represent `mrb_value` as a word.
@@ -126,6 +132,22 @@ largest value of required alignment.
126
132
  * Default value is `4`.
127
133
  * Specifies size of each segment in segment list.
128
134
 
135
+ ## Reduce heap memory configuration.
136
+
137
+ `MRB_USE_LINK_TIME_RO_DATA_P`
138
+ * Only available on ELF platforms.
139
+ * If you specify the address of a read-only section when creating a symbol or string, that string will be used as it is.
140
+ * Heap memory can be saved.
141
+ * Uses `__ehdr_start` and `__init_array_start`.
142
+ * It must be `__ehdr_start < data_addr < __init_array_start`.
143
+
144
+ `MRB_USE_CUSTOM_RO_DATA_P`
145
+ * Takes precedence over `MRB_USE_LINK_TIME_RO_DATA_P`.
146
+ * Please try if `MRB_USE_LINK_TIME_RO_DATA_P` is not available.
147
+ * The `mrb_ro_data_p()` function is implemented by the user in an arbitrary file.
148
+ * The prototype declaration is `mrb_bool mrb_ro_data_p(const char *ptr)`.
149
+ * Return `TRUE` if `ptr` is in read-only section, otherwise return `FALSE`.
150
+
129
151
  ## Other configuration.
130
152
  `MRB_UTF8_STRING`
131
153
  * Adds UTF-8 encoding support to character-oriented String instance methods.
@@ -144,3 +166,20 @@ largest value of required alignment.
144
166
  `MRB_STR_BUF_MIN_SIZE`
145
167
  * Default value is `128`.
146
168
  * Specifies initial capacity of `RString` created by `mrb_str_buf_new` function..
169
+
170
+ `MRB_METHOD_CACHE`
171
+ * Improve performance for method dispatch.
172
+
173
+ `MRB_METHOD_CACHE_SIZE`
174
+ * Default value is `128`.
175
+ * Ignored if `MRB_METHOD_CACHE` is not defined.
176
+ * Need to be the power of 2.
177
+
178
+ `MRB_METHOD_T_STRUCT`
179
+ * Use C struct to represent `mrb_method_t`
180
+ * No `MRB_METHOD_T_STRUCT` requires highest 2 bits of function pointers to be zero
181
+ * Define this macro on machines that use higher bits of pointers
182
+
183
+ `MRB_ENABLE_ALL_SYMBOLS`
184
+ * Make it available `Symbols.all_symbols` in `mrbgems/mruby-symbol-ext`
185
+ * Increase heap memory usage.