javonet-ruby-sdk 2.5.13 → 2.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
  4. data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
  5. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  6. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetCppRuntimeNative.so +0 -0
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetGoRuntimeNative.so +0 -0
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetNetcoreRuntimeNative.so +0 -0
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetPythonRuntimeNative.so +0 -0
  11. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRuby278RuntimeNative.so +0 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRubyRuntimeNative.so +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpClient.so +0 -0
  14. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpTlsClient.so +0 -0
  15. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  17. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NativeUtilsUnitTests.xml +30 -30
  18. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  19. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
  20. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
  21. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
  23. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  36. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
  41. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
  43. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
  44. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
  46. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  51. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  55. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  56. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  59. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  60. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  69. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
  70. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  71. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  73. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
  74. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  75. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  76. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  77. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  78. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  79. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  80. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  81. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  82. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  83. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  84. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  85. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  86. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  87. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  88. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  89. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  90. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
  91. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
  92. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/interpreter/Interpreter.js +4 -0
  93. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/CommandDeserializer.js +30 -14
  94. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/CommandSerializer.js +38 -25
  95. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/TypeSerializer.js +1 -1
  96. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/webSocketClient/WebSocketClient.js +51 -46
  97. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/InvocationContext.js +3 -5
  98. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/RuntimeContext.js +2 -4
  99. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/Path/Tiny.pm +74 -15
  100. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
  101. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
  102. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
  103. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
  104. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  105. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
  106. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
  107. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
  108. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  109. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
  110. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +83 -83
  111. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  112. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  113. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
  114. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  115. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  116. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +25 -25
  117. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
  118. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
  119. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
  120. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/__pycache__/__init__.cpython-312.pyc +0 -0
  121. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-312.pyc +0 -0
  122. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/__init__.cpython-312.pyc +0 -0
  123. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
  124. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
  125. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
  126. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
  127. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
  128. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
  129. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
  130. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
  131. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
  132. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
  134. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
  135. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
  136. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
  137. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
  138. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
  139. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
  140. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
  141. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
  142. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
  143. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
  144. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
  145. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
  146. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGlobalFunctionHandler.cpython-312.pyc +0 -0
  147. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
  148. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
  149. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
  150. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
  151. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
  153. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
  154. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
  156. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/Interpreter.py +1 -2
  157. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
  159. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
  160. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  161. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/CommandDeserializer.py +24 -10
  162. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/CommandSerializer.py +18 -17
  163. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
  164. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
  165. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
  166. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
  167. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py +1 -0
  169. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
  170. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
  171. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
  174. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
  175. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/Command.py +1 -1
  176. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/UtilsConst.cpython-312.pyc +0 -0
  185. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
  187. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
  189. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/ExceptionThrower.py +43 -39
  190. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
  192. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/MessageHelper.cpython-312.pyc +0 -0
  193. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/__init__.cpython-312.pyc +0 -0
  194. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/protocol/command_deserializer.rb +40 -33
  195. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/protocol/command_serializer.rb +12 -19
  196. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/protocol/command_deserializer.rb +40 -33
  197. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/protocol/command_serializer.rb +12 -19
  198. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/protocol/command_deserializer.rb +40 -33
  199. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/protocol/command_serializer.rb +12 -19
  200. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  201. data/lib/javonet-ruby-sdk/core/protocol/command_deserializer.rb +40 -33
  202. data/lib/javonet-ruby-sdk/core/protocol/command_serializer.rb +12 -19
  203. data/lib/javonet-ruby-sdk/sdk/invocation_context.rb +2 -4
  204. data/lib/javonet-ruby-sdk/sdk/runtime_context.rb +2 -5
  205. metadata +2 -2
@@ -2,18 +2,19 @@ require_relative 'type_deserializer'
2
2
  require_relative '../../utils/type'
3
3
  require_relative '../../utils/command'
4
4
  require_relative '../../utils/string_encoding_mode'
5
+ require_relative '../../utils/command_type'
6
+ require_relative '../../utils/runtime_name'
5
7
 
6
8
  class CommandDeserializer
7
-
8
9
  def initialize(buffer)
9
10
  @buffer = buffer
10
- @byte_array_len = buffer.length
11
+ @buffer_len = buffer.length
11
12
  @command = Command.new(buffer[0], buffer[10], [])
12
13
  @position = 11
13
14
  end
14
15
 
15
16
  def is_at_end
16
- @position == @byte_array_len
17
+ @position == @buffer_len
17
18
  end
18
19
 
19
20
  def deserialize
@@ -23,12 +24,7 @@ class CommandDeserializer
23
24
  @command
24
25
  end
25
26
 
26
- # def copy_from(self, bytes_to_copy, elements_to_skip):
27
- # size = len(bytes_to_copy) - elements_to_skip
28
- # new_byte_array = bytes_to_copy[size]
29
- # return new_byte_array
30
-
31
- def read_object(type_num)
27
+ def read_object(type_num)
32
28
  case type_num
33
29
  when Type::COMMAND
34
30
  return self.read_command
@@ -65,19 +61,30 @@ class CommandDeserializer
65
61
  runtime = @buffer[p + 5]
66
62
  command_type = @buffer[p + 6]
67
63
  @position += 7
68
- return_command = Command.new(runtime, command_type, [])
69
- read_command_recursively(number_of_elements_in_payload, return_command)
70
- end
71
-
72
- def read_command_recursively(number_of_elements_in_payload_left, cmd)
73
- if number_of_elements_in_payload_left == 0
74
- cmd
75
- else
76
- p = @position
77
- cmd = cmd.add_arg_to_payload(self.read_object(@buffer[p]))
78
- read_command_recursively(number_of_elements_in_payload_left - 1, cmd)
79
- end
80
- end
64
+ payload = number_of_elements_in_payload.times.map { read_object(@buffer[@position]) }
65
+ Command.new(runtime, command_type, payload)
66
+ end
67
+
68
+ # old implementation
69
+ # def read_command
70
+ # p = @position
71
+ # number_of_elements_in_payload = TypeDeserializer.deserialize_int(@buffer[p + 1..p + 4])
72
+ # runtime = @buffer[p + 5]
73
+ # command_type = @buffer[p + 6]
74
+ # @position += 7
75
+ # return_command = Command.new(runtime, command_type, [])
76
+ # read_command_recursively(number_of_elements_in_payload, return_command)
77
+ # end
78
+ #
79
+ # def read_command_recursively(number_of_elements_in_payload_left, cmd)
80
+ # if number_of_elements_in_payload_left == 0
81
+ # cmd
82
+ # else
83
+ # p = @position
84
+ # cmd = cmd.add_arg_to_payload(self.read_object(@buffer[p]))
85
+ # read_command_recursively(number_of_elements_in_payload_left - 1, cmd)
86
+ # end
87
+ # end
81
88
 
82
89
  def read_string
83
90
  p = @position
@@ -86,7 +93,7 @@ class CommandDeserializer
86
93
  @position += 6
87
94
  p = @position
88
95
  @position += size
89
- TypeDeserializer.deserialize_string(string_encoding_mode, @buffer[p..p + size - 1])
96
+ TypeDeserializer.deserialize_string(string_encoding_mode, @buffer[p...p + size])
90
97
  end
91
98
 
92
99
  def read_int
@@ -94,7 +101,7 @@ class CommandDeserializer
94
101
  @position += 2
95
102
  p = @position
96
103
  @position += size
97
- TypeDeserializer.deserialize_int(@buffer[p..p + size - 1])
104
+ TypeDeserializer.deserialize_int(@buffer[p...p + size])
98
105
  end
99
106
 
100
107
  def read_bool
@@ -102,7 +109,7 @@ class CommandDeserializer
102
109
  @position += 2
103
110
  p = @position
104
111
  @position += size
105
- TypeDeserializer.deserialize_bool(@buffer[p..p + size])
112
+ TypeDeserializer.deserialize_bool(@buffer[p...p + size])
106
113
  end
107
114
 
108
115
  def read_float
@@ -110,7 +117,7 @@ class CommandDeserializer
110
117
  @position += 2
111
118
  p = @position
112
119
  @position += size
113
- TypeDeserializer.deserialize_float(@buffer[p..p + size - 1])
120
+ TypeDeserializer.deserialize_float(@buffer[p...p + size])
114
121
  end
115
122
 
116
123
  def read_byte
@@ -118,7 +125,7 @@ class CommandDeserializer
118
125
  @position += 2
119
126
  p = @position
120
127
  @position += size
121
- TypeDeserializer.deserialize_byte(@buffer[p..p + size])
128
+ TypeDeserializer.deserialize_byte(@buffer[p...p + size])
122
129
  end
123
130
 
124
131
  def read_char
@@ -126,7 +133,7 @@ class CommandDeserializer
126
133
  @position += 2
127
134
  p = @position
128
135
  @position += size
129
- TypeDeserializer.deserialize_char(@buffer[p..p + size])
136
+ TypeDeserializer.deserialize_char(@buffer[p...p + size])
130
137
  end
131
138
 
132
139
  def read_longlong
@@ -134,7 +141,7 @@ class CommandDeserializer
134
141
  @position += 2
135
142
  p = @position
136
143
  @position += size
137
- TypeDeserializer.deserialize_longlong(@buffer[p..p + size - 1])
144
+ TypeDeserializer.deserialize_longlong(@buffer[p...p + size])
138
145
  end
139
146
 
140
147
  def read_double
@@ -142,7 +149,7 @@ class CommandDeserializer
142
149
  @position += 2
143
150
  p = @position
144
151
  @position += size
145
- TypeDeserializer.deserialize_double(@buffer[p..p + size - 1])
152
+ TypeDeserializer.deserialize_double(@buffer[p...p + size])
146
153
  end
147
154
 
148
155
  def read_ullong
@@ -150,7 +157,7 @@ class CommandDeserializer
150
157
  @position += 2
151
158
  p = @position
152
159
  @position += size
153
- TypeDeserializer.deserialize_ullong(@buffer[p..p + size - 1])
160
+ TypeDeserializer.deserialize_ullong(@buffer[p...p + size])
154
161
  end
155
162
 
156
163
  def read_uint
@@ -158,7 +165,7 @@ class CommandDeserializer
158
165
  @position += 2
159
166
  p = @position
160
167
  @position += size
161
- TypeDeserializer.deserialize_uint(@buffer[p..p + size - 1])
168
+ TypeDeserializer.deserialize_uint(@buffer[p...p + size])
162
169
  end
163
170
 
164
171
  def read_nil
@@ -166,6 +173,6 @@ class CommandDeserializer
166
173
  @position += 2
167
174
  p = @position
168
175
  @position += size
169
- TypeDeserializer.deserialize_nil(@buffer[p..p + size])
176
+ TypeDeserializer.deserialize_nil(@buffer[p...p + size])
170
177
  end
171
178
  end
@@ -4,34 +4,27 @@ require_relative '../../utils/runtime_name'
4
4
  require_relative '../../utils/tcp_connection_data'
5
5
 
6
6
  class CommandSerializer
7
- def initialize
8
- @buffer = []
9
- end
10
-
11
7
  def serialize(root_command, connection_data = nil, runtime_version = 0)
12
- insert_into_buffer([root_command.runtime_name, runtime_version])
13
- if connection_data.nil?
14
- insert_into_buffer([0, 0, 0, 0, 0, 0, 0])
8
+ buffer = ''.dup
9
+ buffer << [root_command.runtime_name, runtime_version].pack('C*')
10
+ if connection_data
11
+ buffer << connection_data.serialize_connection_data.pack('C*')
15
12
  else
16
- insert_into_buffer(connection_data.serialize_connection_data)
13
+ buffer << [0, 0, 0, 0, 0, 0, 0].pack('C*')
17
14
  end
18
- insert_into_buffer([RuntimeName::PYTHON, root_command.command_type])
19
- serialize_recursively(root_command)
20
- @buffer
15
+ buffer << [RuntimeName::RUBY, root_command.command_type].pack('C*')
16
+ serialize_recursively(root_command, buffer)
17
+ buffer.bytes
21
18
  end
22
19
 
23
- def serialize_recursively(command)
20
+ def serialize_recursively(command, buffer)
24
21
  command.payload.each do |item|
25
22
  if item.is_a?(Command)
26
- insert_into_buffer(TypeSerializer.serialize_command(item))
27
- serialize_recursively(item)
23
+ buffer << TypeSerializer.serialize_command(item).pack('C*')
24
+ serialize_recursively(item, buffer)
28
25
  else
29
- insert_into_buffer(TypeSerializer.serialize_primitive(item))
26
+ buffer << TypeSerializer.serialize_primitive(item).pack('C*')
30
27
  end
31
28
  end
32
29
  end
33
-
34
- def insert_into_buffer(arguments)
35
- @buffer += arguments
36
- end
37
30
  end
@@ -2,18 +2,19 @@ require_relative 'type_deserializer'
2
2
  require_relative '../../utils/type'
3
3
  require_relative '../../utils/command'
4
4
  require_relative '../../utils/string_encoding_mode'
5
+ require_relative '../../utils/command_type'
6
+ require_relative '../../utils/runtime_name'
5
7
 
6
8
  class CommandDeserializer
7
-
8
9
  def initialize(buffer)
9
10
  @buffer = buffer
10
- @byte_array_len = buffer.length
11
+ @buffer_len = buffer.length
11
12
  @command = Command.new(buffer[0], buffer[10], [])
12
13
  @position = 11
13
14
  end
14
15
 
15
16
  def is_at_end
16
- @position == @byte_array_len
17
+ @position == @buffer_len
17
18
  end
18
19
 
19
20
  def deserialize
@@ -23,12 +24,7 @@ class CommandDeserializer
23
24
  @command
24
25
  end
25
26
 
26
- # def copy_from(self, bytes_to_copy, elements_to_skip):
27
- # size = len(bytes_to_copy) - elements_to_skip
28
- # new_byte_array = bytes_to_copy[size]
29
- # return new_byte_array
30
-
31
- def read_object(type_num)
27
+ def read_object(type_num)
32
28
  case type_num
33
29
  when Type::COMMAND
34
30
  return self.read_command
@@ -65,19 +61,30 @@ class CommandDeserializer
65
61
  runtime = @buffer[p + 5]
66
62
  command_type = @buffer[p + 6]
67
63
  @position += 7
68
- return_command = Command.new(runtime, command_type, [])
69
- read_command_recursively(number_of_elements_in_payload, return_command)
70
- end
71
-
72
- def read_command_recursively(number_of_elements_in_payload_left, cmd)
73
- if number_of_elements_in_payload_left == 0
74
- cmd
75
- else
76
- p = @position
77
- cmd = cmd.add_arg_to_payload(self.read_object(@buffer[p]))
78
- read_command_recursively(number_of_elements_in_payload_left - 1, cmd)
79
- end
80
- end
64
+ payload = number_of_elements_in_payload.times.map { read_object(@buffer[@position]) }
65
+ Command.new(runtime, command_type, payload)
66
+ end
67
+
68
+ # old implementation
69
+ # def read_command
70
+ # p = @position
71
+ # number_of_elements_in_payload = TypeDeserializer.deserialize_int(@buffer[p + 1..p + 4])
72
+ # runtime = @buffer[p + 5]
73
+ # command_type = @buffer[p + 6]
74
+ # @position += 7
75
+ # return_command = Command.new(runtime, command_type, [])
76
+ # read_command_recursively(number_of_elements_in_payload, return_command)
77
+ # end
78
+ #
79
+ # def read_command_recursively(number_of_elements_in_payload_left, cmd)
80
+ # if number_of_elements_in_payload_left == 0
81
+ # cmd
82
+ # else
83
+ # p = @position
84
+ # cmd = cmd.add_arg_to_payload(self.read_object(@buffer[p]))
85
+ # read_command_recursively(number_of_elements_in_payload_left - 1, cmd)
86
+ # end
87
+ # end
81
88
 
82
89
  def read_string
83
90
  p = @position
@@ -86,7 +93,7 @@ class CommandDeserializer
86
93
  @position += 6
87
94
  p = @position
88
95
  @position += size
89
- TypeDeserializer.deserialize_string(string_encoding_mode, @buffer[p..p + size - 1])
96
+ TypeDeserializer.deserialize_string(string_encoding_mode, @buffer[p...p + size])
90
97
  end
91
98
 
92
99
  def read_int
@@ -94,7 +101,7 @@ class CommandDeserializer
94
101
  @position += 2
95
102
  p = @position
96
103
  @position += size
97
- TypeDeserializer.deserialize_int(@buffer[p..p + size - 1])
104
+ TypeDeserializer.deserialize_int(@buffer[p...p + size])
98
105
  end
99
106
 
100
107
  def read_bool
@@ -102,7 +109,7 @@ class CommandDeserializer
102
109
  @position += 2
103
110
  p = @position
104
111
  @position += size
105
- TypeDeserializer.deserialize_bool(@buffer[p..p + size])
112
+ TypeDeserializer.deserialize_bool(@buffer[p...p + size])
106
113
  end
107
114
 
108
115
  def read_float
@@ -110,7 +117,7 @@ class CommandDeserializer
110
117
  @position += 2
111
118
  p = @position
112
119
  @position += size
113
- TypeDeserializer.deserialize_float(@buffer[p..p + size - 1])
120
+ TypeDeserializer.deserialize_float(@buffer[p...p + size])
114
121
  end
115
122
 
116
123
  def read_byte
@@ -118,7 +125,7 @@ class CommandDeserializer
118
125
  @position += 2
119
126
  p = @position
120
127
  @position += size
121
- TypeDeserializer.deserialize_byte(@buffer[p..p + size])
128
+ TypeDeserializer.deserialize_byte(@buffer[p...p + size])
122
129
  end
123
130
 
124
131
  def read_char
@@ -126,7 +133,7 @@ class CommandDeserializer
126
133
  @position += 2
127
134
  p = @position
128
135
  @position += size
129
- TypeDeserializer.deserialize_char(@buffer[p..p + size])
136
+ TypeDeserializer.deserialize_char(@buffer[p...p + size])
130
137
  end
131
138
 
132
139
  def read_longlong
@@ -134,7 +141,7 @@ class CommandDeserializer
134
141
  @position += 2
135
142
  p = @position
136
143
  @position += size
137
- TypeDeserializer.deserialize_longlong(@buffer[p..p + size - 1])
144
+ TypeDeserializer.deserialize_longlong(@buffer[p...p + size])
138
145
  end
139
146
 
140
147
  def read_double
@@ -142,7 +149,7 @@ class CommandDeserializer
142
149
  @position += 2
143
150
  p = @position
144
151
  @position += size
145
- TypeDeserializer.deserialize_double(@buffer[p..p + size - 1])
152
+ TypeDeserializer.deserialize_double(@buffer[p...p + size])
146
153
  end
147
154
 
148
155
  def read_ullong
@@ -150,7 +157,7 @@ class CommandDeserializer
150
157
  @position += 2
151
158
  p = @position
152
159
  @position += size
153
- TypeDeserializer.deserialize_ullong(@buffer[p..p + size - 1])
160
+ TypeDeserializer.deserialize_ullong(@buffer[p...p + size])
154
161
  end
155
162
 
156
163
  def read_uint
@@ -158,7 +165,7 @@ class CommandDeserializer
158
165
  @position += 2
159
166
  p = @position
160
167
  @position += size
161
- TypeDeserializer.deserialize_uint(@buffer[p..p + size - 1])
168
+ TypeDeserializer.deserialize_uint(@buffer[p...p + size])
162
169
  end
163
170
 
164
171
  def read_nil
@@ -166,6 +173,6 @@ class CommandDeserializer
166
173
  @position += 2
167
174
  p = @position
168
175
  @position += size
169
- TypeDeserializer.deserialize_nil(@buffer[p..p + size])
176
+ TypeDeserializer.deserialize_nil(@buffer[p...p + size])
170
177
  end
171
178
  end
@@ -4,34 +4,27 @@ require_relative '../../utils/runtime_name'
4
4
  require_relative '../../utils/tcp_connection_data'
5
5
 
6
6
  class CommandSerializer
7
- def initialize
8
- @buffer = []
9
- end
10
-
11
7
  def serialize(root_command, connection_data = nil, runtime_version = 0)
12
- insert_into_buffer([root_command.runtime_name, runtime_version])
13
- if connection_data.nil?
14
- insert_into_buffer([0, 0, 0, 0, 0, 0, 0])
8
+ buffer = ''.dup
9
+ buffer << [root_command.runtime_name, runtime_version].pack('C*')
10
+ if connection_data
11
+ buffer << connection_data.serialize_connection_data.pack('C*')
15
12
  else
16
- insert_into_buffer(connection_data.serialize_connection_data)
13
+ buffer << [0, 0, 0, 0, 0, 0, 0].pack('C*')
17
14
  end
18
- insert_into_buffer([RuntimeName::PYTHON, root_command.command_type])
19
- serialize_recursively(root_command)
20
- @buffer
15
+ buffer << [RuntimeName::RUBY, root_command.command_type].pack('C*')
16
+ serialize_recursively(root_command, buffer)
17
+ buffer.bytes
21
18
  end
22
19
 
23
- def serialize_recursively(command)
20
+ def serialize_recursively(command, buffer)
24
21
  command.payload.each do |item|
25
22
  if item.is_a?(Command)
26
- insert_into_buffer(TypeSerializer.serialize_command(item))
27
- serialize_recursively(item)
23
+ buffer << TypeSerializer.serialize_command(item).pack('C*')
24
+ serialize_recursively(item, buffer)
28
25
  else
29
- insert_into_buffer(TypeSerializer.serialize_primitive(item))
26
+ buffer << TypeSerializer.serialize_primitive(item).pack('C*')
30
27
  end
31
28
  end
32
29
  end
33
-
34
- def insert_into_buffer(arguments)
35
- @buffer += arguments
36
- end
37
30
  end
@@ -2,18 +2,19 @@ require_relative 'type_deserializer'
2
2
  require_relative '../../utils/type'
3
3
  require_relative '../../utils/command'
4
4
  require_relative '../../utils/string_encoding_mode'
5
+ require_relative '../../utils/command_type'
6
+ require_relative '../../utils/runtime_name'
5
7
 
6
8
  class CommandDeserializer
7
-
8
9
  def initialize(buffer)
9
10
  @buffer = buffer
10
- @byte_array_len = buffer.length
11
+ @buffer_len = buffer.length
11
12
  @command = Command.new(buffer[0], buffer[10], [])
12
13
  @position = 11
13
14
  end
14
15
 
15
16
  def is_at_end
16
- @position == @byte_array_len
17
+ @position == @buffer_len
17
18
  end
18
19
 
19
20
  def deserialize
@@ -23,12 +24,7 @@ class CommandDeserializer
23
24
  @command
24
25
  end
25
26
 
26
- # def copy_from(self, bytes_to_copy, elements_to_skip):
27
- # size = len(bytes_to_copy) - elements_to_skip
28
- # new_byte_array = bytes_to_copy[size]
29
- # return new_byte_array
30
-
31
- def read_object(type_num)
27
+ def read_object(type_num)
32
28
  case type_num
33
29
  when Type::COMMAND
34
30
  return self.read_command
@@ -65,19 +61,30 @@ class CommandDeserializer
65
61
  runtime = @buffer[p + 5]
66
62
  command_type = @buffer[p + 6]
67
63
  @position += 7
68
- return_command = Command.new(runtime, command_type, [])
69
- read_command_recursively(number_of_elements_in_payload, return_command)
70
- end
71
-
72
- def read_command_recursively(number_of_elements_in_payload_left, cmd)
73
- if number_of_elements_in_payload_left == 0
74
- cmd
75
- else
76
- p = @position
77
- cmd = cmd.add_arg_to_payload(self.read_object(@buffer[p]))
78
- read_command_recursively(number_of_elements_in_payload_left - 1, cmd)
79
- end
80
- end
64
+ payload = number_of_elements_in_payload.times.map { read_object(@buffer[@position]) }
65
+ Command.new(runtime, command_type, payload)
66
+ end
67
+
68
+ # old implementation
69
+ # def read_command
70
+ # p = @position
71
+ # number_of_elements_in_payload = TypeDeserializer.deserialize_int(@buffer[p + 1..p + 4])
72
+ # runtime = @buffer[p + 5]
73
+ # command_type = @buffer[p + 6]
74
+ # @position += 7
75
+ # return_command = Command.new(runtime, command_type, [])
76
+ # read_command_recursively(number_of_elements_in_payload, return_command)
77
+ # end
78
+ #
79
+ # def read_command_recursively(number_of_elements_in_payload_left, cmd)
80
+ # if number_of_elements_in_payload_left == 0
81
+ # cmd
82
+ # else
83
+ # p = @position
84
+ # cmd = cmd.add_arg_to_payload(self.read_object(@buffer[p]))
85
+ # read_command_recursively(number_of_elements_in_payload_left - 1, cmd)
86
+ # end
87
+ # end
81
88
 
82
89
  def read_string
83
90
  p = @position
@@ -86,7 +93,7 @@ class CommandDeserializer
86
93
  @position += 6
87
94
  p = @position
88
95
  @position += size
89
- TypeDeserializer.deserialize_string(string_encoding_mode, @buffer[p..p + size - 1])
96
+ TypeDeserializer.deserialize_string(string_encoding_mode, @buffer[p...p + size])
90
97
  end
91
98
 
92
99
  def read_int
@@ -94,7 +101,7 @@ class CommandDeserializer
94
101
  @position += 2
95
102
  p = @position
96
103
  @position += size
97
- TypeDeserializer.deserialize_int(@buffer[p..p + size - 1])
104
+ TypeDeserializer.deserialize_int(@buffer[p...p + size])
98
105
  end
99
106
 
100
107
  def read_bool
@@ -102,7 +109,7 @@ class CommandDeserializer
102
109
  @position += 2
103
110
  p = @position
104
111
  @position += size
105
- TypeDeserializer.deserialize_bool(@buffer[p..p + size])
112
+ TypeDeserializer.deserialize_bool(@buffer[p...p + size])
106
113
  end
107
114
 
108
115
  def read_float
@@ -110,7 +117,7 @@ class CommandDeserializer
110
117
  @position += 2
111
118
  p = @position
112
119
  @position += size
113
- TypeDeserializer.deserialize_float(@buffer[p..p + size - 1])
120
+ TypeDeserializer.deserialize_float(@buffer[p...p + size])
114
121
  end
115
122
 
116
123
  def read_byte
@@ -118,7 +125,7 @@ class CommandDeserializer
118
125
  @position += 2
119
126
  p = @position
120
127
  @position += size
121
- TypeDeserializer.deserialize_byte(@buffer[p..p + size])
128
+ TypeDeserializer.deserialize_byte(@buffer[p...p + size])
122
129
  end
123
130
 
124
131
  def read_char
@@ -126,7 +133,7 @@ class CommandDeserializer
126
133
  @position += 2
127
134
  p = @position
128
135
  @position += size
129
- TypeDeserializer.deserialize_char(@buffer[p..p + size])
136
+ TypeDeserializer.deserialize_char(@buffer[p...p + size])
130
137
  end
131
138
 
132
139
  def read_longlong
@@ -134,7 +141,7 @@ class CommandDeserializer
134
141
  @position += 2
135
142
  p = @position
136
143
  @position += size
137
- TypeDeserializer.deserialize_longlong(@buffer[p..p + size - 1])
144
+ TypeDeserializer.deserialize_longlong(@buffer[p...p + size])
138
145
  end
139
146
 
140
147
  def read_double
@@ -142,7 +149,7 @@ class CommandDeserializer
142
149
  @position += 2
143
150
  p = @position
144
151
  @position += size
145
- TypeDeserializer.deserialize_double(@buffer[p..p + size - 1])
152
+ TypeDeserializer.deserialize_double(@buffer[p...p + size])
146
153
  end
147
154
 
148
155
  def read_ullong
@@ -150,7 +157,7 @@ class CommandDeserializer
150
157
  @position += 2
151
158
  p = @position
152
159
  @position += size
153
- TypeDeserializer.deserialize_ullong(@buffer[p..p + size - 1])
160
+ TypeDeserializer.deserialize_ullong(@buffer[p...p + size])
154
161
  end
155
162
 
156
163
  def read_uint
@@ -158,7 +165,7 @@ class CommandDeserializer
158
165
  @position += 2
159
166
  p = @position
160
167
  @position += size
161
- TypeDeserializer.deserialize_uint(@buffer[p..p + size - 1])
168
+ TypeDeserializer.deserialize_uint(@buffer[p...p + size])
162
169
  end
163
170
 
164
171
  def read_nil
@@ -166,6 +173,6 @@ class CommandDeserializer
166
173
  @position += 2
167
174
  p = @position
168
175
  @position += size
169
- TypeDeserializer.deserialize_nil(@buffer[p..p + size])
176
+ TypeDeserializer.deserialize_nil(@buffer[p...p + size])
170
177
  end
171
178
  end
@@ -4,34 +4,27 @@ require_relative '../../utils/runtime_name'
4
4
  require_relative '../../utils/tcp_connection_data'
5
5
 
6
6
  class CommandSerializer
7
- def initialize
8
- @buffer = []
9
- end
10
-
11
7
  def serialize(root_command, connection_data = nil, runtime_version = 0)
12
- insert_into_buffer([root_command.runtime_name, runtime_version])
13
- if connection_data.nil?
14
- insert_into_buffer([0, 0, 0, 0, 0, 0, 0])
8
+ buffer = ''.dup
9
+ buffer << [root_command.runtime_name, runtime_version].pack('C*')
10
+ if connection_data
11
+ buffer << connection_data.serialize_connection_data.pack('C*')
15
12
  else
16
- insert_into_buffer(connection_data.serialize_connection_data)
13
+ buffer << [0, 0, 0, 0, 0, 0, 0].pack('C*')
17
14
  end
18
- insert_into_buffer([RuntimeName::PYTHON, root_command.command_type])
19
- serialize_recursively(root_command)
20
- @buffer
15
+ buffer << [RuntimeName::RUBY, root_command.command_type].pack('C*')
16
+ serialize_recursively(root_command, buffer)
17
+ buffer.bytes
21
18
  end
22
19
 
23
- def serialize_recursively(command)
20
+ def serialize_recursively(command, buffer)
24
21
  command.payload.each do |item|
25
22
  if item.is_a?(Command)
26
- insert_into_buffer(TypeSerializer.serialize_command(item))
27
- serialize_recursively(item)
23
+ buffer << TypeSerializer.serialize_command(item).pack('C*')
24
+ serialize_recursively(item, buffer)
28
25
  else
29
- insert_into_buffer(TypeSerializer.serialize_primitive(item))
26
+ buffer << TypeSerializer.serialize_primitive(item).pack('C*')
30
27
  end
31
28
  end
32
29
  end
33
-
34
- def insert_into_buffer(arguments)
35
- @buffer += arguments
36
- end
37
30
  end
@@ -1 +1 @@
1
- 2.5.13
1
+ 2.5.14