Skip to content

Instantly share code, notes, and snippets.

@jschementi
Created May 14, 2009 23:44
Show Gist options
  • Save jschementi/111987 to your computer and use it in GitHub Desktop.
Save jschementi/111987 to your computer and use it in GitHub Desktop.
Patch Sinatra 0.9.1.1 to work with IronRuby
--- a/sinatra-0.9.4/lib/sinatra/base.rb Tue Aug 18 21:10:44 2009
+++ b/sinatra-0.9.4/lib/sinatra/base.rb Tue Aug 18 22:52:03 2009
@@ -957,6 +957,14 @@
/active_support/, # active_support require hacks
] unless self.const_defined?('CALLERS_TO_IGNORE')
+ unless self.const_defined?('RUBY_IGNORE_CALLERS')
+ IRONRUBY_IGNORE_CALLERS = [
+ /\.cs/, # C# stack traces that shows up in debug mode
+ /$^/ # .NET stack traces that shows up in release mode are without the filename
+ ]
+ RUBY_IGNORE_CALLERS = IRONRUBY_IGNORE_CALLERS
+ end
+
# add rubinius (and hopefully other VM impls) ignore patterns ...
CALLERS_TO_IGNORE.concat(RUBY_IGNORE_CALLERS) if defined?(RUBY_IGNORE_CALLERS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment