moovweb / tritium

Tritium is a magical document modifying language. It's JavaScript-like and simple to learn. Think XSLT without the nightmare. It was designed by Hampton Catlin (@hcatlin), and has been heavily influenced by Aaron Leung (@akhleung).
http://tritium.io
Mozilla Public License 2.0
33 stars 7 forks source link

inner kills the server #5

Closed jeffpatzer closed 13 years ago

jeffpatzer commented 13 years ago

using something like

      $("./div/a[1]") {
        inner("X")
      }

kills the server by hanging it


ju001 IN 06:01:21 tritium: --> Importing _click_and_collect.ts
/usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/engine.rb:16:in `instance_eval': wrong number of arguments (1 for 0) on script line 5635 (ArgumentError)
    from (eval):11270:in `block (13 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `block in select'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:239:in `block in each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:26:in `select'
    from (eval):11268:in `block (12 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `block in select'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:239:in `block in each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:26:in `select'
    from (eval):11266:in `block (11 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `block in select'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:239:in `block in each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:26:in `select'
    from (eval):11236:in `block (10 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `block in select'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:239:in `block in each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:26:in `select'
    from (eval):11234:in `block (9 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:56:in `call'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:56:in `with'
    from (eval):11230:in `block (8 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:46:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:46:in `match'
    from (eval):978:in `block (7 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:56:in `call'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:56:in `with'
    from (eval):588:in `block (6 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:46:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:46:in `match'
    from (eval):586:in `block (5 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:28:in `block in select'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:239:in `block in each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/nokogiri-1.4.4/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/node_modules/selection_methods.rb:26:in `select'
    from (eval):184:in `block (4 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/text_scope.rb:49:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/text_scope.rb:49:in `doc'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scopes/text_scope.rb:63:in `html'
    from (eval):44:in `block (3 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:56:in `call'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:56:in `with'
    from (eval):42:in `block (2 levels) in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:46:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:46:in `match'
    from (eval):40:in `block in run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:21:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/scope.rb:21:in `script'
    from (eval):2:in `run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/engine.rb:16:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/tritium-0.4.151/lib/tritium/engines/legacy/reference/engine.rb:16:in `run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/manhattan-0.4.548/lib/manhattan_server/lib/project.rb:107:in `run'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/quadrium-0.1.37/lib/quadrium/handlers/base.rb:78:in `block in get_response_modifier'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/quadrium-0.1.37/lib/quadrium/response.rb:72:in `call'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/quadrium-0.1.37/lib/quadrium/response.rb:72:in `transform_body'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/quadrium-0.1.37/lib/quadrium/response.rb:19:in `modify'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/quadrium-0.1.37/lib/quadrium/handlers/base.rb:45:in `outgoing_response'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/quadrium-0.1.37/lib/quadrium/handlers/debug.rb:62:in `outgoing_response'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/manhattan-0.4.548/lib/manhattan_server/lib/proxy/em_proxy.rb:179:in `block in handle_upstream_response'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@asda/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `block in spawn_threadpool'
^C>> Stopping ...
      IN 06:01:27 moov: >> Stopping ssl web server...
>> Stopping ...

running version .548

HamptonMakes commented 13 years ago

Fixed in 0.5

just use...

inner() { set("text") }

for now