def is_macruby? defined? RUBY_ENGINE && RUBY_ENGINE == 'macruby' end
Cheers, Josh On Dec 17, 2009, at 12:18 AM, Paul Howson wrote: > Is there a way to test if code is running in MacRuby rather than Ruby? I'm > developing and testing some code using plain old Ruby 1.8.7 in TextMate, then > integrating it into an Xcode project, so I need to be able to "comment out" > some lines which are Cocoa-dependent when testing in plain Ruby. > > Paul Howson > _______________________________________________ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel _______________________________________________ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
