The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
evil.rb wants love

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
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
evil.rb wants love Posted: Apr 12, 2007 9:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eigen Class.
Original Post: evil.rb wants love
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass

Advertisement

evil.rb is an experimental library that makes it possible to manipulate internal structures from the Ruby interpreter*1.

If you're interested in the internals of the interpreter, evil.rb can prove an excellent educational tool, since it allows you to peek into the object model, method dispatching...

In the past, some people have been using evil.rb to *2

  • change the class of an object
  • manipulate the inheritance chain for fun and profit
  • grab instance variables or singleton methods
  • swap objects (ever heard of Object#become?)
  • change the self context of a Proc (the way 1.9's instance_exec does)
  • mess with the flags of an object (frozen, tainted...)

Here's a list of articles where evil.rb is used to extend Ruby or illustrate how the interpreter works (please drop a comment if you have additional pointers of interest):


Read more...

Read: evil.rb wants love

Topic: Name that tune! Previous Topic   Next Topic Topic: Sort your files the easy way - with Ruby!

Sponsored Links



Google
  Web Artima.com   

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