The calendar is gone.
Click here to view posts


Ruby documentation
I am looking for documentation on this functionality in ruby.
104 == ?g  #=> true
Clearly it returns the numeric value of 'g'. Why would I use this feature I can not find documentation about? Speed..
n = 5000000 => 5000000
Benchmark.bm do |x|
 x.report {  0.upto(n) do 104 == ?g end}
 x.report {  0.upto(n) do "g" == "g" end }
 x.report {  0.upto(n) do "g".eql?("g") end}
end
#      user     system      total        real
#  1.270000   0.000000   1.270000 (  1.330858)
#  4.220000   0.010000   4.230000 (  4.497720)
#  4.190000   0.070000   4.260000 (  5.206511)
I am looking around my small set of books and the online documentation and have not found anything. I must admit I am unsure how to search for this.

Ruby documentation
I found the answer to my ruby code question. I found the documentation for assignment using *.
*x = one,two,three #=> x=[one,two,three]
one,two,three = *x #=> this takes the x array and splits it out.