• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
GavinStark Avatar
Name:Gavin Stark
Clan:Suncoast Developers Guild
Member Since:Apr 2014
Last Seen:Jul 2024
Profiles:
Following:340
Followers:342
Allies:339
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (8)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • lodashreload
    • commented on "Square Every Digit" ruby solution
    • 3 years ago

    Wow that top solution is magical

  • Custom User Avatar
    • Mr.Dr.Professor
    • commented on "Fake Binary" ruby solution
    • 5 years ago

    String include the Comparable moudle which give you
    the ability to compare strings using the regular
    relation operators (>, <, >=, <=)
    https://ruby-doc.org/core-2.7.2/Comparable.html

  • Custom User Avatar
    • GavinStark
    • commented on "Fake Binary" ruby solution
    • 7 years ago

    Ruby will consider "0" < "5" (same with "1", "2", "3", and "4")

  • Custom User Avatar
    • joehenriod
    • commented on "Fake Binary" ruby solution
    • 7 years ago

    How does the || s < "5" || part work if 5 was a string and not an integer?

    Can the less than (<) operator read strings?

  • Custom User Avatar
    • GiacomoSorbi
    • resolved an issue on "Coding Meetup #17 - Higher-Order Functions Series - Sort by programming language" kata
    • 8 years ago

    Description updated, let me know if I forgot anything else.

  • Custom User Avatar
    • lilsweetcaligula
    • commented on "Coding Meetup #17 - Higher-Order Functions Series - Sort by programming language" kata
    • 8 years ago

    Indeed, thanks for pointing this out, Gavin. Basically, as of the time of writing of this comment, the format presented for Ruby is as specified by Gavin:

    { "first_name" => "Nikau", "last_name" => 'R.', "country" => "New Zealand", "continent" => "Oceania", "age" => 39, "language" => "Ruby" }

  • Custom User Avatar
    • GavinStark
    • created an issue for "Coding Meetup #17 - Higher-Order Functions Series - Sort by programming language" kata
    • 8 years ago

    Your examples in the "input" section appear to be from the JavasScript version of this kata (given the use of var) and would lead someone to believe you are using symbols as your keys. For example: { firstName: 'Nikau', lastName: 'R.', country: 'New Zealand', continent: 'Oceania', age: 39, language: 'Ruby' }

    In case you are not familiar with this style of litereal hash formatting, this is the same as: { :firstName => 'Nikau', :lastName => 'R.', :country => 'New Zealand', :continent => 'Oceania', :age => 39, :language => 'Ruby' }

    However your test cases use String keys and snake case for the keys. Example: { "first_name" => "Nikau", "last_name" => 'R.', "country" => "New Zealand", "continent" => "Oceania", "age" => 39, "language" => "Ruby" }

    If you were not intending on having the kata practice handling both Symbol and String keys (as well as the different cases) then you should update the input to follow the expected keys. The description says that the test cases will follow exactly the form shown.

  • Custom User Avatar
    • mamafrantz
    • commented on "Simple Fun #165: Withdraw " ruby solution
    • 8 years ago

    woooooooooow

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...