Project

General

Profile

Bug #6974 » cn_ruby_sc_1r9r3_bug_hwm_10_check.rb

check numerator and denominator program - jks (john sikora), 09/04/2012 12:00 PM

 
#
# checks to see if the numerators and denominators are equal with Ruby 1.9.2
# and 1.9.3 to see if Bignum or BigDecimal is the problem. for hwm = 10.
#

puts
# compare numerators.

num_string = []
File.open("./cn_numer_before_hwm_10_sc_ruby_ver_1r9r2_test.txt") do |f|
num_string[0] = f.gets.chomp
end

File.open("./cn_numer_before_hwm_10_sc_ruby_ver_1r9r3_test.txt") do |f|
num_string[1] = f.gets.chomp
end


if num_string[0] == num_string[1]
print "numerators equal"
else
print "numerators unequal"
end
puts; puts


# compare denominators.

num_string = []
File.open("./cn_denom_before_hwm_10_sc_ruby_ver_1r9r2_test.txt") do |f|
num_string[0] = f.gets.chomp
end

File.open("./cn_denom_before_hwm_10_sc_ruby_ver_1r9r3_test.txt") do |f|
num_string[1] = f.gets.chomp
end


if num_string[0] == num_string[1]
print "denominators equal"
else
print "denominators unequal"
end
puts

(2-2/2)