Bug 514822 - Deprecation warnings printed in console with Ruby 2.4
Add Bignum and Fixnum to atomic_types only for pre-2.4 Ruby as on newer
they are just alias for Integer.
Change-Id: I2c5a96c2309cbd6137913e273f75bae61f35efc2
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/plugins/org.eclipse.dltk.ruby.abstractdebugger/debugger/dbgp/PropertyElement.rb b/plugins/org.eclipse.dltk.ruby.abstractdebugger/debugger/dbgp/PropertyElement.rb
index bf8ed06..9adb021 100644
--- a/plugins/org.eclipse.dltk.ruby.abstractdebugger/debugger/dbgp/PropertyElement.rb
+++ b/plugins/org.eclipse.dltk.ruby.abstractdebugger/debugger/dbgp/PropertyElement.rb
@@ -40,8 +40,9 @@
end
def atomic?(obj)
- atomic_types = [Bignum, FalseClass, Fixnum, Float, Integer, NilClass,
+ atomic_types = [FalseClass, Float, Integer, NilClass,
Numeric, Range, Regexp, String, Symbol, TrueClass]
+ atomic_types += [Bignum, Fixnum] if (RUBY_VERSION < "2.4")
atomic_types.include?(obj.class)
end