Ticket #1 (assigned defect)
Simple eval not working
| Reported by: | acrylic | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | 0.5 |
| Component: | component1 | Version: | 1.0 |
| Keywords: | Cc: |
Description
$ cat test.rb
require "sandbox"
sand = Sandbox.new
p sand.eval("'wtf'.upcase")
$ ruby1.8 test.rb
/Users/me/Library/ruby/1.8/lib/ruby/site_ruby/1.8/sandbox.rb:73:in `_eval': can't dump anonymous class #<Class:0x1291c> (TypeError)
from /Users/me/Library/ruby/1.8/lib/ruby/site_ruby/1.8/sandbox.rb:73:in `eval'
from test.rb:3
$ cat test2.rb
require "sandbox"
sand = Sandbox.new
sand.eval("def blah() 'blah' end")
sand.eval("blah()")
$ ruby1.8 test2.rb
(eval):2:in `_eval': #<Class:0x11c9c>: undefined method `blah' for main:Object (Sandbox::Exception)
from /Users/me/Library/ruby/1.8/lib/ruby/site_ruby/1.8/sandbox.rb:73:in `eval'
from test2.rb:4
$ svn info Path: . URL: http://code.whytheluckystiff.net/svn/sandbox/trunk Repository Root: http://code.whytheluckystiff.net/svn/sandbox Repository UUID: 007ef50e-e316-db11-9fa0-00132028b6dc Revision: 104 Node Kind: directory Schedule: normal Last Changed Author: mental Last Changed Rev: 104 Last Changed Date: 2006-10-06 01:36:26 +0200 (Fri, 06 Oct 2006)
It seems most tests are failing also.
Change History
Note: See
TracTickets for help on using
tickets.
