The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
The Sandbox is Loading Gems and Acting Less Freaky

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
The Sandbox is Loading Gems and Acting Less Freaky Posted: Aug 30, 2006 2:50 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: The Sandbox is Loading Gems and Acting Less Freaky
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

I really hoped that 1.8.5 and the sandbox would go hand and glove, but continuing development has caused a split from Ruby 1.8.5. (See the patch.) But, nevermind that, it’ll be okay, considering that the sandbox now loads gems!

 require 'sandbox'
 hpricot_broken = Sandbox.new :init => :all
 hpricot_broken.eval %{
 require 'rubygems'
 require_gem 'hpricot', '=0.4'
 require 'hpricot'
 puts Hpricot("<a class=test>link</a>").search(".test")
 }
 hpricot_fixed = Sandbox.new :init => :all
 hpricot_fixed.eval%{
 require 'rubygems'
 require_gem 'hpricot', '=0.4.47'
 require 'hpricot'
 puts Hpricot("<a class=test>link</a>").search(".test")
 }

Two separate versions of Hpricot, illustrating a broken version and a fixed version, both inside the same Ruby process. This is a new checkpoint for sandbox and I’m calling it 0.1. (Installation instructions.) Available on my development gems or, better yet, as a tarball.

Read: The Sandbox is Loading Gems and Acting Less Freaky

Topic: You shouldn't compare Rails to Java EE 5, or JavaScript/Ruby to the Java language... Previous Topic   Next Topic Topic: Uncle Bob on Ruby and Rails

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use