Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
require 'java' module SwingHelp include_class 'java.lang.Runnable' class RunnableProc include Runnable def initialize(&block) @block = block end def run @block.call end end end class Proc def to_runnable SwingHelp::RunnableProc.new &self end end
From the Design Piracy series on my blog: