# Solution to rails bug exposed by utility belt

**URL:** <https://www.ruby-forum.com/t/solution-to-rails-bug-exposed-by-utility-belt/123926>\
**Category:** Ruby\
**Created:** [December 22, 2007, 3:57am UTC](https://www.ruby-forum.com/t/solution-to-rails-bug-exposed-by-utility-belt/123926 "2007-12-22T03:57:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 22, 2007, 3:57am UTC](https://www.ruby-forum.com/t/solution-to-rails-bug-exposed-by-utility-belt/123926/1 "2007-12-22T03:57:48Z")

</div>

Hi all, if you saw this discussion earlier, there’s a workaround:

[http://gilesbowkett.blogspot.com/2007/12/solution-to-rails-bug-which-utility.html](http://gilesbowkett.blogspot.com/2007/12/solution-to-rails-bug-which-utility.html)

–  
Giles B.

Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 22, 2007, 5:17am UTC](https://www.ruby-forum.com/t/solution-to-rails-bug-exposed-by-utility-belt/123926/2 "2007-12-22T05:17:18Z")

</div>

On 12/21/07, Giles B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all, if you saw this discussion earlier, there’s a workaround:
> 
> [http://gilesbowkett.blogspot.com/2007/12/solution-to-rails-bug-which-utility.html](http://gilesbowkett.blogspot.com/2007/12/solution-to-rails-bug-which-utility.html)

How is this a Rails bug? Rails bundles ruby-breakpoint which, when  
enabled, requires irb. That’s fine, irb may be used as a library as  
well as from the command line.

The bug is that your library shovels a ton of collision-prone methods  
into Object instead of properly extending the IRB context.

(Note: Rails 2 switched to ruby-debug since ruby-breakpoint broke when  
Binding.of\_caller went the way of the dodo.)

Best regards,  
jeremy

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 24, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/solution-to-rails-bug-exposed-by-utility-belt/123926/3 "2007-12-24T19:39:30Z")

</div>

> How is this a Rails bug? Rails bundles ruby-breakpoint which, when  
> enabled, requires irb. That’s fine, irb may be used as a library as  
> well as from the command line.

OK, solution for Rails loading arbitrary .irbrc code into Rails apps.

> The bug is that your library shovels a ton of collision-prone methods  
> into Object instead of properly extending the IRB context.

Patches welcome.

> (Note: Rails 2 switched to ruby-debug since ruby-breakpoint broke when  
> Binding.of\_caller went the way of the dodo.)

Thank you! In that case it’s only an issue for before Rails 2.

–  
Giles B.

Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 24, 2007, 8:18pm UTC](https://www.ruby-forum.com/t/solution-to-rails-bug-exposed-by-utility-belt/123926/4 "2007-12-24T20:18:05Z")

</div>

> The bug is that your library shovels a ton of collision-prone methods  
> into Object instead of properly extending the IRB context.

I’m hesitating to respond on this thing because A) I might have to  
admit to being wrong about something, and I’ve always firmly  
maintained the position that I am perfect in every way, and B) because  
it totally looks like the start of a flame war, but just for the hell  
of it, can anyone give me more detail on this? Is it actually possible  
to set stuff up in the IRB context without it being attached to  
Object? If there’s a way to make my code better, I want to know more.

–  
Giles B.

Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)
