21 April 2014

The Ruby Reflector

Topic

IRB

  Source Favicon
By Patrick Reagan of Viget.com Blogs 14 days ago.
Email

…answering his questions, researching answers with him, and working on basic programming concepts in IRB.

This was fun for the both of us and his questions were really awesome, but I found that it didn't hold his interest for long. While the programming exercises I came up with were basic, they weren't all that compelling for a child his age. The positive feedback was there — seeing 1 + 1 output 2 when typed in to an IRB prompt showed that something was happening, but it wasn't …

viget.com Read
  Source Favicon
By interblah.net of interblah.net 1 year ago.
Email

…instance_variable_get and instance_variable_set on some objects in an IRB session:

class Thing def initialize @ value = Object . new end end class OtherThing end thing = Thing . new thing . instance_variables # => [:@value] ivar = thing . instance_variable_get ( :@value ) # => #<Object:0x007fe43a050e30> other_thing = OtherThing . new other_thing . instance_variables # => [] other_thing . instance_variable_set ( :@transplanted_value , ivar ) other_thing . instance_variables …

interblah.net Read
  Source Favicon
Email

There's our string with the invalid byte! How do we know for sure? In that IRB session we can simulate a comparable issue by sending a message to the string it won't like - like split or gsub . > "hi \255".split(' ') ArgumentError: invalid byte sequence in UTF-8 from (irb):9:in `split' from (irb):9 from /Users/joel/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `<main>'

Yup. It certainly does not like that.

Let's create a very …

robots.thoughtbot.com Read
  Source Favicon
Email

Phusion Passenger Enterprise's live IRB console feature can optionally disable the process before attaching itself, so that the administrator can debug the process without him being disrupted by traffic.

What Ruby can do to improve Out-of-Band Work

It would be great if the Ruby interpreter can provide some sort of API to find out when the garbage collector should be run. That way you can delegate all garbage collection work to the out-of-band phase. The current solution …

blog.phusion.nl Read
  Source Favicon
On Plasticx Blog over 1 year ago.
Email

I gave a lightening talk about IRB ( Interactive Ruby Shell) at Seattle.rb on 01/08/2013.

Here is my speaker deck: https://speakerdeck.com/monde/seattle-dot-rb-irb-presentation

Here my notes and example irbrc's: http://bit.ly/seattle-rb-irb

The irbtools gem is really massive in all of the features it curates together. As mentioned in the deck, I prefer a more simple setup of:

integrated vim to edit/paste code via the interactive editor gem

blog.mondragon.cc Read
  Source Favicon
By Peter Cooper of Ruby Inside over 1 year ago.
Email

…reply.split , the string refused to split on whitespace. Yet if he did "@twellyme film".split in IRB, that was fine.

International man of mystery Will Jessop suggested checking $; (it's a special global variable that defines the default separator for String#split ). It was OK.

In an attempt to look smarter than I am, I suggested reply.method(:split).source_location to see if the String class had been monkey-patched by something annoying. Nope. (Though …

rubyinside.com Read
  Source Favicon
Email

Many libraries have Rake tasks applicable to this step. rake console is a common task that opens an IRB shell with your in-development copy of the library loaded into it. If the library is made available as a gem, there will be a task that builds the gem (e.g. rake build ), and you'll want to make sure this still works after you change things.

Note that while the changes I made to Chronic were in multiple commits, you should really put both the tests and the code that passes …

robots.thoughtbot.com Read
  Source Favicon
By Peter Cooper of Ruby Inside over 1 year ago.
Email

…webapps and the ' Enterprise' variant includes rolling restarts, a live IRB console, and more.

Rails 3.2.7 Released

Contains an important security fix for apps using digest authentication from Action Pack. But 3.2.8 is just around the corner..

Rails 3.2.8 Release Candidate 1 Released: Final Due on Friday

Phusion Shares A Sneak Peek of the Phusion Passenger 4.0 Roadmap

After a period of radio silence, the Phusion guys are back on the …

rubyinside.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup over 1 year ago.
Email

Roadmap Preview 2: live IRB console, deployment error resistance, new website - More on the upcoming version of Phusion Passenger. The live debugging looks pretty slick.

Backbone.js: Hacker's Guide Part 2 - More internals for your fun and profit.

The Mac App Store's future of irrelevance - Could it be that the App Store will fail, because apps bought that way are significantly disadvantaged? I think it more likely that a future version of …

afreshcup.com Read
  Source Favicon
By Hongli Lai of Phusion Corporate Blog over 1 year ago.
Email

You can attach an IRB console to any live, running Ruby application process managed by Phusion Passenger Enterprise. In this console you can inspect the application's state using Ruby code, and modify it in a REPL manner. Just invoke this command: passenger-irb <PID OF THE APP>

Phusion Passenger Enterprise also allows you to attach a ruby-debug console to any Phusion Passenger-managed Ruby process that has the debugging flag turned on. Ruby-debug normally requires …

blog.phusion.nl Read