From cd72befc86f2861bbb3341bf506712265916884c Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Tue, 24 Jun 2008 01:05:55 +0000 Subject: [PATCH] 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 --- lib/rb/spec/deprecation_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.17.1