Created
February 13, 2010 00:55
-
-
Save mchung/303164 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'parse_tree' | |
require 'parse_tree_extensions' | |
require 'ruby2ruby' | |
require 'spec' | |
def code_for_a_proc(proc) | |
proc.to_ruby | |
end | |
my_proc = proc {|a,b| return "I want this proc as a string or sexp." } | |
code_for_a_proc(my_proc).should == "proc { |a, b| return \"I want this proc as a string or sexp.\" }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment