Undefined local variable or method ` ‘

October 9, 2008 § Leave a comment

Ever had this little nugget of information? Lets play spot the difference…

Example 1
def my_method(args) # :nodoc:

Example 2
def my_method(args) # :nodoc:

You will notice that there is no apparent difference, which is why I couldn’t work out why one line of code ran, and one caused an error. Anyway, to cut a long story short, I found a unicode character on the line that wasn’t working – and that unicode character didn’t have a corresponding variable or method!

So, Chris’ Thursday Tip is to turn on invisible characters in TextMate (View -> Show Invisibles ⌥⌘I).

Original post: Undefined local variable or method ` ‘.

Advertisements

Tagged: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Undefined local variable or method ` ‘ at Fringley's Blog.

meta

%d bloggers like this: