Thank you for the TextEdit file. I could reproduce it on PC by opening your .rtf file in Wordpad and copy/pasting the code into the Ruby console. It is weird.
After it I've copy/pasted the code into a Notepad++ document both from the forums and from wordpad, the two codes visually looked exactly the same. Though if I copy the code to SketchUp from that notepad++ document what was copied from the forums it runs without any problems but if I copy it from the document copied from the wordpad it shows the same error you referred to. Weird.
After it I saved both notepad++ files and surprise! They had different sizes though they visually looked exactly the same.
I opened these saved files in hexeditor and I saw that the one copied from TextEdit represents the space characters at the beginning of the line with 3 characters (C2 A0 20) while the one copied from the forums represents them only with character hex 20. This suggests some character encoding issue what might be the cause of the problem. Does TextEdit has an option to set the character encoding? Can you set it to ASCII and try it again?
I'm not sure if this is the reason but this is the only difference what I could identify between the 2 copies....

