From: "Iñaki Baz Castillo" Date: 2009-12-06T11:23:35+09:00 Subject: Re: Why doesn't Ruby "compile" strings? El Domingo, 6 de Diciembre de 2009, Marnen Laibow-Koser escribió: > > Is it imposible due to the design of Ruby? > > It's not impossible at all: just use symbols instead of strings. What do you mean with symbols? do you mean using the following?: puts Benchmark.realtime { 1.upto(500000) {|i| :"hello_world".to_s.upcase } } I expect the same results as when converting the symbol to string (to_s) Ruby would generate a new string for each iteration, am I wrong? Thanks. -- Iñaki Baz Castillo