ENV.dup
is deprecated in favor of ENV.to_h
. 8
9Socket.gethostbyname('hal')
10
11ENV.dup12
13# SomeKlass
14class SomeKlass
Description
Some class methods, such as exists
(for classes File
and Dir
) and iterator
have been deprecated in favour
of exist
and block_given
respectively.
Bad practice
File.exists?(some_path)
Dir.exists?(some_path)
if iterator?
yield
end
Recommended
File.exist?(some_path)
Dir.exist?(some_path)
if block_given?
yield
end