From: Kevin Clark Date: Tue, 24 Jun 2008 01:05:55 +0000 (+0000) Subject: rb: Use defined? JRUBY_VERSION to detect JRuby [THRIFT-38] X-Git-Tag: 0.2.0~504 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=cd72befc86f2861bbb3341bf506712265916884c;p=common%2Fthrift.git rb: Use defined? JRUBY_VERSION to detect JRuby [THRIFT-38] From kevin@rapleaf.com git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670980 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/spec/deprecation_spec.rb b/lib/rb/spec/deprecation_spec.rb index 57c2f770..b0cc527b 100644 --- a/lib/rb/spec/deprecation_spec.rb +++ b/lib/rb/spec/deprecation_spec.rb @@ -177,12 +177,12 @@ describe "deprecate_class!" do 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 @@ describe "deprecate_module!" do 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