Author: kclark
Date: Mon Jun 23 18:05:55 2008
New Revision: 670980

URL: http://svn.apache.org/viewvc?rev=670980&view=rev
Log:
rb: Use defined? JRUBY_VERSION to detect JRuby [THRIFT-38]

>From [EMAIL PROTECTED]

Modified:
    incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb

Modified: incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb?rev=670980&r1=670979&r2=670980&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb Mon Jun 23 18:05:55 
2008
@@ -177,12 +177,12 @@
   it_should_behave_like "deprecation"
 
   def stub_stderr_jruby(klass)
-    return if RUBY_PLATFORM != "java"
+    return unless defined? JRUBY_VERSION
     stub_stderr(klass, nil, caller.first)
   end
 
   def stub_stderr_mri(klass, offset=1)
-    return if RUBY_PLATFORM == "java"
+    return if defined? JRUBY_VERSION
     stub_stderr(klass, offset, caller.first)
   end
 
@@ -300,12 +300,12 @@
   it_should_behave_like "deprecation"
 
   def stub_stderr_jruby(mod)
-    return if RUBY_PLATFORM != "java"
+    return unless defined? JRUBY_VERSION
     stub_stderr(mod, nil, caller.first)
   end
 
   def stub_stderr_mri(mod, offset=1)
-    return if RUBY_PLATFORM == "java"
+    return if defined? JRUBY_VERSION
     stub_stderr(mod, offset, caller.first)
   end
 


Reply via email to