Using Ruby 1.9.2
Problem
Compare the content, not the results, of two procs. I understand the results can\'t be tested because
If you're using Ruby 1.9, you may be able to use the sourcify gem.
$ irb
> require 'sourcify'
=> true
> a = proc {@x == "x"}
=> #
> b = proc {@x == %{x}}
=> #
> a == b
=> false
> a.to_source == b.to_source
=> true
> RUBY_VERSION
=> "1.9.2"
We also ran into the ParseTree/Ruby 1.9 incompatibility problem at my company.