Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
#Used to demonstrate the fix to have jirb read .irbrc correctly under windows #See http://webmat.wordpress.com/2007/10/18/jruby-not-in-its-setting/ #Code excerpt from JRuby's irb/init.rb file, as of JRuby 1.0.1... # enumerate possible rc-file base name generators def IRB.rc_file_generators if irbrc = ENV["IRBRC"] yield proc{|rc| rc == "rc" ? irbrc : irbrc+rc} end if home = ENV["HOME"] yield proc{|rc| home+"/.irb#{rc}"} end home = Dir.pwd yield proc{|rc| home+"/.irb#{rc}"} yield proc{|rc| home+"/irb#{rc.sub(/\A_?/, '.')}"} yield proc{|rc| home+"/_irb#{rc}"} yield proc{|rc| home+"/$irb#{rc}"} end
This paste will be private.
From the Design Piracy series on my blog: