For as much as it's claimed that RGSS isn't necessarily Ruby, it would be wise to consult the standard styleguide for Ruby anyways: https://github.com/bbatsov/ruby-style-guide
A lot of the issues I see revolve around odd usage of semicolons, explicit returns, and honestly just concepts coming from other languages.
One of the big things that drives me up a wall are people that do something like this:
# Bad - Hanging Indentationsome_method.with.a_longer.chain🙂parameter_1, 😛arameter_2, 😛arameter_3, 😛arameter_4) # Good - Drop to a new linesome_method.with.a_longer.chain( 😛arameter_1, 😛arameter_2, 😛arameter_3, 😛arameter_4)
but that comes down to stylistic quibbles more than anything.
The big thing I would avoid would be using the english operators for and and or. They have extremely low precedence and can make for some annoying issues later. The styleguide above mentions it. Personally I'll only use them for control flow type reasons, such as:
my_method or raise 'Nope' my_method and my_other_method or special_it_failed_method
Granted you can use if/else branches for that, but it makes for a nice amount of succinctness in certain cases.
A lot of the issues I see revolve around odd usage of semicolons, explicit returns, and honestly just concepts coming from other languages.
One of the big things that drives me up a wall are people that do something like this:
# Bad - Hanging Indentationsome_method.with.a_longer.chain🙂parameter_1, 😛arameter_2, 😛arameter_3, 😛arameter_4) # Good - Drop to a new linesome_method.with.a_longer.chain( 😛arameter_1, 😛arameter_2, 😛arameter_3, 😛arameter_4)
but that comes down to stylistic quibbles more than anything.
The big thing I would avoid would be using the english operators for and and or. They have extremely low precedence and can make for some annoying issues later. The styleguide above mentions it. Personally I'll only use them for control flow type reasons, such as:
my_method or raise 'Nope' my_method and my_other_method or special_it_failed_method
Granted you can use if/else branches for that, but it makes for a nice amount of succinctness in certain cases.