<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 25, 2014 at 6:37 AM, S Page <span dir="ltr"><<a href="mailto:spage@wikimedia.org" target="_blank">spage@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>E.g. <a href="https://github.com/cheezy/page-object/wiki/Elements" target="_blank">https://github.com/cheezy/page-object/wiki/Elements</a> has <code><code></code></code><br><pre><code>  button(:your_name, :id => 'an_id')</code></pre>but our features/support/foo_page.rb files have e.g.<br><pre><code>  h1(:first_heading, id: "firstHeading")</code></pre>is this Ruby strangeness, or just supporting alternative syntaxes?</div></blockquote></div><br>`:id => 'an_id'` and `id: "firstHeading"` are Ruby hashes. The former is the Ruby 1.8 syntax (hash rocket), the latter is Ruby 1.9+ syntax.</div><div class="gmail_extra"><br></div><div class="gmail_extra">More information:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://github.com/bbatsov/ruby-style-guide#no-mixed-hash-syntaces">https://github.com/bbatsov/ruby-style-guide#no-mixed-hash-syntaces</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">RuboCop is instructed to allow both, at the moment. Example for Flow:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://github.com/wikimedia/mediawiki-extensions-Flow/blob/master/.rubocop_todo.yml#L61-L65">https://github.com/wikimedia/mediawiki-extensions-Flow/blob/master/.rubocop_todo.yml#L61-L65</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Ċ½eljko</div></div>