I'm not sure if there's any benefits or detriments to using one or the other with alias. Preliminary research seems to say that it makes it look more Ruby like to use symbols. It's also more apparent as opposed to using what was called "naked words". Another seems to say that because you are using them like labels as a way to refer to the names rather than directly referencing them. Visually, I prefer the symbol format, especially in VX Ace since the names come up in that yellow/orange colour.
I've also taken more to using alias_method(old_name, new_name) as well. Not sure why, just something of a personal preference. Whilst I can't say I know whether using them with or without the colons is good or bad, I can at least bring something in regards to alias vs alias_method with one of those having something to do with scoping. This might be useful for that:
http://www.ruby-forum.com/topic/135598
The asterisk in Ruby isn't to do with deferencing like it is in C++ (I initially believed this too, so you aren't alone). In Ruby, it allows for variable length argument lists, which is also the name for it maybe. For example (original code found from the link below):
def varargs(arg1, *rest)
"Got #{arg1} and #{rest.join(', ')}"
end
varargs("one") » "Got one and "
varargs("one", "two") » "Got one and two"
varargs("one", "two", "three") » "Got one and two, three"
*
http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_methods.htmlIf you look at scripts that modern and some other scripters including myself have written, when we alias methods we will do this:
alias :old_method :new_method
def new_method(*args, &block)
old_method(*args, &block)
end
We do this because we might not be sure, or we don't really care maybe, about the arguments coming in. The original method might not take arguments, but what if some other script aliased the old method and he did want some things passed in. We aren't building our script with theirs in mind, but we want to increase compatibility. Using a variable length argument, like *args, achieves that.
Ruby doesn't have a Boolean object type. It has two types in place of that: TrueClass and FalseClass. When you use the keyword 'true' or 'false' it is a keyword that references an object of the respective type (true is a TrueClass, false is a FalseClass). When you come to checking the object type with the .is_a? method, you will have to check for it being a TrueClass object or a FalseClass one. What I do, sometimes, is a make a method that I might call #is_bool?(variable) that will return true if it's either a TrueClass or FalseClass, or false otherwise. It's not great, but it does the trick.