![]() |
| |||||||
| Ruby Forum Ruby on Rails Programming Forum. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| |||
| Aliasing and the back-quote
--Apple-Mail-7--800787163 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed On page 232 of the Ruby book, there is the following code: alias :cmd :` cmd "date" which works. However, ` "date" does not work, although `"date"` does. Why does cmd work without a second back-quote while a single=20 back-quote does not work at all? Bob Peirce Venetia, PA =20= 724-941-6883 bob@peirce-family.com [HOME (Mac)] rbp@cooksonpeirce.com [OFFICE] There is=A0 only one basic human=A0 right, the=A0 right to do as you = damn well please.=A0 And with it comes the only basic human duty, the duty to take the consequences.=A0 -- P.J. O'Rourke --Apple-Mail-7--800787163-- |
| |||
| Aliasing and the back-quote
Robert Peirce wrote: My best guess would be something like this: The bactick is a special case, with a special syntax. It's the only method (I can think of) that is called by two syntactic instances surrounding its argument. This is for historical reasons. It's all handled in the parser as a special case. If you alias this "unusual" name to a "normal" name, they will both behave as they normally would, with no special treatment either way. Does this non-answer make any sense? Hal |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Aliasing an URL | ewijaya | HTML Forum | 1 | 05-03-2007 01:18 PM |
| Single Quote Versus Double Quote In A href link | knee-dragger@hotmail.com | HTML Forum | 3 | 06-13-2006 12:42 AM |
| [BUG] Aliasing :lambda | Florian Gross | Ruby Forum | 2 | 02-29-2004 09:35 AM |
| Aliasing operators possible? | GGarramuno | Ruby Forum | 1 | 12-31-2003 11:04 PM |
| Anti-Aliasing | Philipp Neuhaus | Nvidia Video Card Forum | 4 | 09-06-2003 12:11 AM |