--1926193751-2033535784-12568665374485 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-2033535784-1256866537=:24485" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-2033535784-12568665374485 Content-Type: TEXT/PLAIN; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8BIT Hi -- On Fri, 30 Oct 2009, RichardOnRails wrote: > Hi, > > In The Well Grounded Rubyist (which, along with The Ruby Way, I > love), Thanks :-) > Dave Black presents a justification for the x++ omission in > Ruby. I thought I'd see whether I could implement just the > incrementing portion of C's x++ functionality (without the prefix/ > postfix issues) in pure Ruby. I wasnÃÕ willing to delve into Matz> implementation of higher-level Ruby functions or low-level C/C++ > code. Below is what I came up with. > > Q1. Test 1 failed, I imagine, because the interpret thought Å¢h, 7ÃÔ > a Fixnum which I Á×e seen billions of times, so I know what to do with > it. Thus, it ignored my over-riding definition of Fixnum. So I > call it ÅÄompiler error to use the vernacular, by reporting that x > had no method ÅÑp Am I all wet? x is a FixNum, not a Fixnum. In fact you're not actually reopening Fixnum; you've created an entirely new, unrelated class called FixNum. Is that what you meant to do? (I'll hold off discussing your other questions further pending clarification of that :-) David -- The Ruby training with D. Black, G. Brown, J.McAnally Compleat Jan 22-23, 2010, Tampa, FL Rubyist http://www.thecompleatrubyist.com David A. Black/Ruby Power and Light, LLC (http://www.rubypal.com) --1926193751-2033535784-12568665374485-- --1926193751-2033535784-12568665374485--