Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## the code module Mulaka def self.grazuila(a, b, &block) p instance_eval &block end end class Object def grazuila(a, b=nil, &block) Mulaka.grazuila(a, b, &block) end end grazuila "foztabul" do puts "wouldn't you love to know" grazuila "gztorla" do puts "why the fuck someone would" end end ## MRI 68-26-244-235:rubinius brian$ ruby describe.rb describe.rb:3: warning: parenthesize argument(s) for future version wouldn't you love to know describe.rb:16:in `grazuila': wrong number of arguments (1 for 2) (ArgumentError) from describe.rb:16 from describe.rb:3:in `instance_eval' from describe.rb:3:in `grazuila' from describe.rb:9:in `grazuila' from describe.rb:13 ## rbx 68-26-244-235:rubinius brian$ shotgun/rubinius describe.rb wouldn't you love to know An exception has occurred: wrong number of arguments (got 1, required 2) (ArgumentError) Backtrace: Mulaka.grazuila at describe.rb:2 Module#__script__ {} at describe.rb:16 Kernel(Module)#instance_eval at kernel/core/eval.rb:135 Mulaka.grazuila at describe.rb:3 Object#grazuila at describe.rb:9 Object#__script__ at describe.rb:13 CompiledMethod#as_script at kernel/core/compiled_method.rb:359 Compile.single_load at kernel/core/compile.rb:252 Compile.load_from_extension at kernel/core/compile.rb:324 Object#__script__ at kernel/loader.rb:204
This paste will be private.
From the Design Piracy series on my blog: