copytrans contacts 2.100 crack
yadu aadu
Notes
Category:Software that uses Qt
Category:Data synchronizationQ:
Compare Version using ruby
I have 2 ruby files. One is config file. From config file, I am trying to load values from app.rb file.
I am using this code to compare 2 versions of app.rb
if File.file?('app/config/app.rb')
if File.exists?('app/config/app.rb')
$a = File.readlines('app/config/app.rb')
$b = IO.readlines('app/config/app.rb')
$a.each do |line|
if line =~ /KeyA = valueA/
keyA = line
end
end
$b.each do |line|
if line =~ /KeyB = valueB/
keyB = line
end
end
if(keyA == keyB)
return "app.rb is updated"
end
end
end
The above code always returning false.
So what I am missing in above code. Please suggest.
A:
You should never compare strings with ==. Try to use the method.eql? or.equal?
# if you compare strings using ==
"foo" == "foo"
# => true
# if you compare strings using.eql?
"foo" == "foo"
# => false
# if you compare strings using.equal?
"foo" == "foo"
# => true
Mutation analysis of the melanocortin-1 receptor gene in Norwegian ac619d1d87
Related links:
Comments