This is a subjective question, so we can only give (hopefully well-reasoned) opinions. I always use option A. My explanation:
A block of code opens and closes at the same level of indentation, which creates "visual cohesion."
If the variable name changes its size, you don't need to edit anything (some text editors handle this automatically, though).
You create a βholeβ in the source code. The larger the variable name, the larger the hole. IMO this is visually annoying. In addition, you have less free space until you reach a reasonable limit of 80/100-char.
I use this style when writing multi-line hashes / arrays / ... (pay attention to the comma also in the last element, so that we can easily arrange and simplify them):
hash = { :a => 1, :b => 2, } array = [ :a, :b, ]
source share