Question

I am writing a search engine using the Lucene Java framework.

What I want to do is to create an index of Ruby source code files. For that I would like to have the option of using a stop word filter, i.e. I want the stop words of the ruby language be ignored when indexing the files.

--> Does anyone know of a nice complete list of Ruby stop words? (e.g. def, end, module, ...)

Surprisingly enough, Google did not provide me with an answer... So any help would be appreciated!

Was it helpful?

Solution

alias   and     BEGIN   begin   break   case    class   def     defined?
do      else    elsif   END     end     ensure  false   for     if 
in      module  next    nil     not     or      redo    rescue  retry 
return  self    super   then    true    undef   unless  until   when 
while   yield 

From Ruby QuickRef.

For what it's worth, these are generally called "reserved words" - and I found this list by Googling for Ruby reserved words.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top