Phalado (Raphael Cordeiro) wrote in #note-2: > nobu (Nobuyoshi Nakada) wrote in #note-1: > ... If you're checking a string for the value `"true"`, you're not checking for an exact `true` or `false` value. This is a data conversion appl...austin (Austin Ziegler)
nobu (Nobuyoshi Nakada) wrote in #note-5: > austin (Austin Ziegler) wrote in #note-3: > ... In my feature branch where I'm converting to Data classes. > > ... This is the problem, of course, with having maintained something backwa...austin (Austin Ziegler)
You are correct (and I should have known better; I have unit tests proving this). I'm not sure if this is an IRB issue, because IRB's output always outputs `<data …>`. ``` irb(main):002> p Color::CIELAB[1,2,3] CIELAB [1.0000% 2.0...austin (Austin Ziegler)
I'm preparing a new version of Color and I have decided to make all of the colour classes Data classes. However, it does not appear that `#inspect` can be overridden: ```ruby module Color CIELAB = Data.define(:l, :a, :b) do ...austin (Austin Ziegler)
jeromedalbert (Jerome Dalbert) wrote in #note-4: > I like this feature request, a non-failing require would be great for gems that optionally depend on another gem. > ... Unfortunately, that `if` will not work, because: ```ruby p r...austin (Austin Ziegler)
byroot (Jean Boussier) wrote in #note-66: > Note that you don't necessarily need to set `# frozen_string_literal: true` to be compatible. > ... It is worth noting that standardrb (the variant of Rubocop that I use) turns off `# frozen_...austin (Austin Ziegler)
AlexandreMagro (Alexandre Magro) wrote in #note-52: > austin (Austin Ziegler) wrote in #note-50: > ... Not necessarily. I don't know much about how the parser works to produce the AST, but if it is able to do a *small* bit of backtrack...austin (Austin Ziegler)
lpogic (Łukasz Pomietło) wrote in #note-49: > The notation `a |>= b` could be considered syntactic sugar for `a = a |> b`. Please remember that most binary operators in Ruby have similar syntactic sugar (including `||` and `&&`). I do...austin (Austin Ziegler)
Dan0042 (Daniel DeLorme) wrote in #note-3: > Another idea is `filter_map(first: true)` > ... Most of the cases where enumerable methods would benefit from a `limit` keyword would probably be better served by the use of `#lazy` enumerab...austin (Austin Ziegler)
Dan0042 (Daniel DeLorme) wrote in #note-8: > I would agree with any of these combinations, but not all of them at once. > ... GitHub Actions takes what I think is the right choice for this: ```typescript /** * Gets the input valu...austin (Austin Ziegler)