bundle exec ruby に限定した詳細を詰めます。まず Box の API と、失敗時の gemspec 評価コンテキストを計測します。
Gem の状態が明確に違います(メソッド数 106 vs 238、object_id も別)。namespace を直接特定します。
namespace が確定しました。最後に root 側の状態を確認して、話を閉じます。
計測が揃いました。bundle exec ruby(rake なし)に限定した詳細です。
| require 'socket' | |
| PORT = 8088 | |
| server = TCPServer.open(PORT) | |
| children = [] | |
| puts "server.0 starting children" | |
| 9.times do |i| | |
| num = i + 1 # 0 is for main | |
| children << Thread.start(server) do |s| |
| require 'msgpack' | |
| # x = "\x82\xA9condition\xA2OR\xA6groups\x92\x82\xA9condition\xA2or\xA7filters\x91\x83\xA3col\xAAbirth_date\x | |
| # A3ope\xA5month\xA3val\xA12\x82\xA9condition\xA2or\xA7filters\x91\x83\xA3col\xADshare_capital\xA3ope\xB3greater_or_equal_ | |
| # th\xDD\x98[)\x8DL\f\v\x8C\f" | |
| # MessagePack.unpack x | |
| x2 = "\x82\xA9condition\xA2OR\xA6groups\x92\x82\xA9condition\xA2or\xA7filters\x91\x83\xA3col\xAAbirth_date\xA3ope\xA5month\xA3val\xA12\x82\xA9condition\xA2or\xA7filters\x91\x83\xA3col\xADshare_capital\xA3ope\xB3greater_or_equal_th\xDD\x98[)\x8DL\f\v\x8C\f" |
| [ | |
| {"name": "Amina Frost", "country": "US", "city": "Hammond", "amount": 30}, | |
| {"name": "Mehak Flowers", "country": "US", "city": "Kansas City", "amount": 41}, | |
| {"name": "Angharad Davie", "country": "AU", "city": "Queenstown", "amount": 31}, | |
| {"name": "Hannah Robins", "country": "UK", "city": "Langport", "amount": 1}, | |
| {"name": "Romilly Lowe", "country": "US", "city": "Kansas City", "amount": 10}, | |
| {"name": "Komal Donaldson", "country": "UK", "city": "Langport", "amount": 19}, | |
| {"name": "Florence Andrew", "country": "US", "city": "Kansas City", "amount": 7} | |
| ] |
| class Foo | |
| def initialize | |
| @closed = false | |
| end | |
| def close | |
| @closed = true | |
| end | |
| def closed? |
| access-log: /dev/null | |
| hosts: | |
| "localhost": | |
| listen: 8384 | |
| paths: | |
| "/t": | |
| mruby.handler: | | |
| class Foo | |
| def initialize(ch, a) | |
| @ch = ch |
| class X | |
| NAME1 = "name1" | |
| NAME2 = "name2" | |
| NAME3 = "name3" | |
| def replace_name_0(record, name) | |
| record | |
| end | |
| def replace_name_1(record, name) |
| {:here=>"write0", :length=>124} | |
| {:read=> | |
| {:timekey=>24998551, | |
| :tagkey=>"hoge.pos.moge.hogehogehogehoge", | |
| :keys=>{:moge=>111}, | |
| :id=>"d0d71b3d-b680-4549-b805-a08825e0f71d", | |
| :s=>1024, | |
| :c=>1499913050, | |
| :m=>1499913110}} | |
| {:here=>"write1", :length=>102} |
| vagrant@vagrant-ubuntu-trusty-64:/vagrant$ ruby hoge.rb | |
| {:here=>"rescue", :closed=>true, :error=>#<IOError: stream closed>} | |
| vagrant@vagrant-ubuntu-trusty-64:/vagrant$ ruby -e 'puts RUBY_VERSION' | |
| 2.3.3 | |
| vagrant@vagrant-ubuntu-trusty-64:/vagrant$ ruby -v | |
| ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux-gnu] |