Comment

Comment by robhu

This works in Ruby:

  irb(main):001:0> require 'set'
  => true

  irb(main):002:0> {'foo' => [1, 2, [true].to_set]} == {'foo' 
  => [1, 2, [false].to_set]}
  => false

  irb(main):003:0> {'foo' => [1, 2, [true].to_set]} == {'foo' 
  => ['1'.to_i, 2, [true].to_set]}
  => true
parent robhu 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton