@mypath = File.expand_path(File.dirname(__FILE__)) def foo puts @mypath end bar = "16.9" bar1 = "16" bar = bar.gsub(".",",") bar1 = bar1.gsub(".",",") puts bar puts bar1 foo