* TSX rises 51.88 points, or 0.41 percent, to 12,568.77 * Eight of 10 main index sectors advance * Gold-mining shares slip with bullion price * RBC climbs, has biggest impact on market By John Tilak TORONTO, July 17 (Reuters) - Canada's main stock index climbed on Wednesday to its highest in 1-1/2 months after Federal Reserve Chairman Ben Bernanke said that the U.S. central bank's plans for its monetary stimulus program were not set in stone. Financial stocks led the gains, while a falling bullion price pushed gold miners lower. Bernanke said the Fed still expects to start scaling back its massive bond purchases later this year, but he left open the option of changing that plan if the economic outlook shifted. Bernanke shook global markets earlier this year by hinting that the Fed could put an end to its stimulus program sooner than many had expected, while his comments last week that the Fed's stance would stay accommodative drove markets to record levels. "Market sentiment really hinges on what the latest word from the Fed is," said Michael Sprung, president of Sprung Investment Management. "Bernanke is just trying to have a more balanced approach and not have that kind of an effect on the markets," he added. The Toronto Stock Exchange's S&P/TSX composite index closed up 51.88 points, or 0.41 percent, at 12,568.77, after reaching 12,597.99, its highest since June 4. Bernanke's statement suggests that the Fed has things under control but is flexible at the same time, said Fred Ketchen, director of equity trading at ScotiaMcLeod. "The Fed has a half-decent handle on where they're going, how they're going to get there and if things change they've got the common sense to change with it," he added. Eight of the 10 main sectors on the index were higher. Financials, the index's most heavily weighted sector, climbed 1.1 percent. Royal Bank of Canada, the country's biggest lender, was up 2 percent at C$63.80 and had the biggest influence on the index. Bank of Nova Scotia added 1.6 percent to C$58.04. The materials sector, which includes mining stocks, lost 1.3 percent, hurt by a 2.7 percent drop in shares of gold miners. The group slipped with the lower bullion price, which gave back early gains after Bernanke said the stimulus could end this year. Barrick Gold Corp fell 1.7 percent to C$16.34, and Goldcorp Inc stumbled 1.9 percent to C$27.62. Canadian National Railway Co advanced 1.1 percent to C$105.48, helping lift the industrials group up 0.9 percent.