tario / shikashi

shikashi is a ruby sandbox that permits the execution of "unprivileged" scripts by defining the permitted methods and constants the scripts can invoke with a white list logic

Home Page:http://tario.github.com/shikashi/doc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined method in getsource

der-flo opened this issue · comments

If I run one of your example, I get the following error:

$ ruby test/dsl_test.rb 
/Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/getsource-0.2.0/lib/getsource.rb:50:in `body': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/shikashi-0.4.0/lib/shikashi/sandbox.rb:183:in `handle_method'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/evalhook-0.4.0/lib/evalhook.rb:85:in `call'
    from sandbox-650417:3:in `inside_foo'
    from test/dsl_test.rb:28:in `<main>'

Any ideas?

Sorry, I have no dsl_test.rb (I dont remember to have included a example of
that name,) . Can you send it to me, please ?

Also, *you should now that shikashi is not compatible (yet) with ruby
1.9, *compatibility
with ruby1.9 is the most important milestone for next release of shikashi
(and dependencies)

2011/5/19 der-flo <
reply@reply.github.com>

If I run one of your example, I get the following error:

$ ruby test/dsl_test.rb
/Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/getsource-0.2.0/lib/getsource.rb:50:in
`body': undefined method `[]' for nil:NilClass (NoMethodError)
       from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/shikashi-0.4.0/lib/shikashi/sandbox.rb:183:in
`handle_method'
       from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/evalhook-0.4.0/lib/evalhook.rb:85:in
`call'
       from sandbox-650417:3:in `inside_foo'
       from test/dsl_test.rb:28:in `<main>'

Any ideas?

Reply to this email directly or view it on GitHub:
#6

I will create the corresponding issue in getsource project

Fixed the getsource issue release 0.2.1. But remember, shikashi is not
compatible with ruby 1.9

2011/5/19 Dario darios3@gmail.com

Sorry, I have no dsl_test.rb (I dont remember to have included a example of
that name,) . Can you send it to me, please ?

Also, *you should now that shikashi is not compatible (yet) with ruby 1.9,
*compatibility with ruby1.9 is the most important milestone for next
release of shikashi (and dependencies)

2011/5/19 der-flo <
reply@reply.github.com>

If I run one of your example, I get the following error:

$ ruby test/dsl_test.rb
/Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/getsource-0.2.0/lib/getsource.rb:50:in
`body': undefined method `[]' for nil:NilClass (NoMethodError)
       from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/shikashi-0.4.0/lib/shikashi/sandbox.rb:183:in
`handle_method'
       from /Users/xxx/.rvm/gems/ruby-1.9.2-p180@xxx/gems/evalhook-0.4.0/lib/evalhook.rb:85:in
`call'
       from sandbox-650417:3:in `inside_foo'
       from test/dsl_test.rb:28:in `<main>'

Any ideas?

Reply to this email directly or view it on GitHub:
#6

Thanks for your fix, it works!
btw: dsl_test.rb was file of mine

Too bad, that it isn't ruby1.9-ready yet. Can you tell me concrete issues? Maybe I can live with them until you finished your milestone.

Ok, basically, I have a battery of tests for evalhook, shikashi and
partialruby gems (using rspec), all of these tests pass %100 for Ruby 1.8,
but half of these specs fails with Ruby 1.9. If it fail the spec, we are
sure that the gem won't work properly

The specs are located in the root directory where the gem is installed
(shikashi does not include the spec in the gem, but the spec of all the gems
including shikashi are in the corresponding repository)

2011/5/20 der-flo <
reply@reply.github.com>

Thanks for your fix, it works!
btw: dsl_test.rb was file of mine

Too bad, that it isn't ruby1.9-ready yet. Can you tell me concrete issues?
Maybe I can live with them until you finished your milestone.

Reply to this email directly or view it on GitHub:
#6 (comment)