Rupee gains 40 paise against U.S. dollar on optimism over GST restructuring and positive equity markets.