havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
matthewd has quit [Ping timeout: 252 seconds]
matthewd has joined #ruby
TCZ has joined #ruby
millerti has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
davispuh has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
william1_ has joined #ruby
bmurt has joined #ruby
bambanx has quit [Quit: Leaving]
davidw has quit [Ping timeout: 260 seconds]
william1_ has quit [Ping timeout: 260 seconds]
ttoocs has joined #ruby
ttoocs has quit [Ping timeout: 268 seconds]
eddof13 has quit [Ping timeout: 258 seconds]
greengriminal has joined #ruby
genpaku has quit [Quit: Lost terminal]
sergioro has joined #ruby
genpaku has joined #ruby
mossplix has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 240 seconds]
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
noizex has joined #ruby
greengriminal has quit [Quit: Leaving]
davidw has joined #ruby
davidw has quit [Changing host]
davidw has joined #ruby
meinside has joined #ruby
mossplix has joined #ruby
ttoocs has joined #ruby
kristofers has joined #ruby
ttoocs has quit [Ping timeout: 268 seconds]
bruce_lee has quit [Ping timeout: 258 seconds]
skryking_ has joined #ruby
skryking has quit [Ping timeout: 268 seconds]
DTZUZO_ has quit [Ping timeout: 265 seconds]
DTZUZO has joined #ruby
davidw has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Quit: AJA4350]
bruce_lee has joined #ruby
mossplix has quit [Remote host closed the connection]
RiPuk has quit [Ping timeout: 268 seconds]
lupine has quit [Read error: Connection reset by peer]
lupine has joined #ruby
RiPuk has joined #ruby
ttoocs has joined #ruby
TCZ has quit [Quit: Bye Bye]
ttoocs has quit [Ping timeout: 260 seconds]
gnufr33d0m has quit [Quit: gnufr33d0m]
mossplix has joined #ruby
alexherbo26 has joined #ruby
kyrylo has joined #ruby
alex`` has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 268 seconds]
alexherbo26 is now known as alexherbo2
alex`` has joined #ruby
anveo has joined #ruby
ttoocs has joined #ruby
duderonomy has joined #ruby
sgen has quit [Ping timeout: 260 seconds]
wildtrees has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
Esa_ has quit []
mossplix has quit [Remote host closed the connection]
william1_ has joined #ruby
rahult has joined #ruby
orbyt_ has joined #ruby
william1_ has quit [Ping timeout: 265 seconds]
bruce_lee has quit [Ping timeout: 260 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
skryking_ has quit [Quit: Konversation terminated!]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
kristofers has quit [Ping timeout: 268 seconds]
kristofers has joined #ruby
fphilipe_ has joined #ruby
mossplix has joined #ruby
gnufr33d0m has joined #ruby
mossplix has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 268 seconds]
kevinburke has quit [Quit: Connection closed for inactivity]
im0nde_ has quit [Ping timeout: 246 seconds]
im0nde has joined #ruby
kristofers has quit [Quit: leaving]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
factormystic has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
bruce_lee has joined #ruby
houhoulis has joined #ruby
jaequery has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
bsdbandit-01 has joined #ruby
bsdband41 has quit [Ping timeout: 245 seconds]
jaequery has joined #ruby
jaequery has quit [Ping timeout: 260 seconds]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
NODE has quit [Excess Flood]
rahult has quit [Read error: Connection reset by peer]
NODE has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
gix- has quit [Ping timeout: 260 seconds]
william1_ has joined #ruby
william1_ has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
anveo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
markopasha has quit [Remote host closed the connection]
drincruz has joined #ruby
Swyper has quit [Remote host closed the connection]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NODE has quit [Excess Flood]
NODE has joined #ruby
cloaked1 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
kyrylo has joined #ruby
cloaked1 has quit [Read error: Connection reset by peer]
ua has quit [Ping timeout: 265 seconds]
gnufr33d0m has quit [Quit: gnufr33d0m]
jenrzzz has quit [Ping timeout: 240 seconds]
william1_ has joined #ruby
sauvin has joined #ruby
william1_ has quit [Ping timeout: 268 seconds]
regedit has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
sergioro has quit [Ping timeout: 265 seconds]
schne1der has joined #ruby
houhoulis has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s3nd1v0g1us has joined #ruby
i9zO5AP has quit [Quit: WeeChat 2.5]
schne1der has quit [Ping timeout: 240 seconds]
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
william1_ has joined #ruby
abcdf has joined #ruby
mossplix has joined #ruby
abcdf has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
andikr has joined #ruby
zdm has joined #ruby
infinityfye has joined #ruby
zdm has quit [Quit: Leaving]
jenrzzz has joined #ruby
buckworst has joined #ruby
conta has joined #ruby
schne1der has joined #ruby
conta has quit [Client Quit]
AndroidKitKat has quit [Ping timeout: 240 seconds]
mossplix has quit [Remote host closed the connection]
buckworst has quit [Quit: WeeChat 2.7]
AndroidKitKat has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
schne1der has quit [Ping timeout: 268 seconds]
s3nd1v0g1us has quit [Quit: WeeChat 2.6]
xco has joined #ruby
mossplix has joined #ruby
schne1der has joined #ruby
william1_ has quit [Ping timeout: 268 seconds]
conta has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
dionysus69 has joined #ruby
kyrylo has quit [Ping timeout: 258 seconds]
conta has quit [Quit: conta]
DTZUZO has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
phaul_ has joined #ruby
william1_ has joined #ruby
gitter1234 has joined #ruby
regedit has quit [Quit: Connection closed for inactivity]
buckworst has joined #ruby
dminuoso_ has left #ruby ["WeeChat 2.6"]
cthu| has quit [Ping timeout: 268 seconds]
chalkmonster has joined #ruby
rainmanjam has quit [Ping timeout: 265 seconds]
rainmanjam has joined #ruby
inkvar has joined #ruby
<gitter1234> Hi! I'm trying to create my first Rails app and am now trying to implement comments: https://captainvita.gitbooks.io/blog-with-ror/chapter3.html#improving-the-comment-form -- but how come this form_for gives "First argument in form cannot contain nil or be empty"?
inkvar has quit [Client Quit]
ellcs has joined #ruby
<chalkmonster> gitter1234: the error tells you all you need to know, your @article is probably nil
<gitter1234> nope actually its not.. but @comment is tho
<chalkmonster> gitter1234: are your routes set up correctly?
<chalkmonster> gitter1234: @comment should be Comment.new, did you initialize it
<gitter1234> oops.. im so sorry, i forgot about the routes part !
<chalkmonster> ...
<gitter1234> hehe
<chalkmonster> it'll only work if you have nested routes set up
<gitter1234> its working no chalkmonster - thank you very much!
<chalkmonster> happy to help, don't see much activity on IRC anymore
reber has joined #ruby
<gitter1234> yeah me neither :/
<gitter1234> slack seems to be taking over
fphilipe_ has joined #ruby
reber_ has joined #ruby
cd has quit [Quit: cd]
reber has quit [Ping timeout: 240 seconds]
<chalkmonster> gitter1234: yeah, sucks
fphilipe_ has quit [Ping timeout: 265 seconds]
mossplix has quit [Remote host closed the connection]
mossplix_ has joined #ruby
pwnd_nsfw has joined #ruby
reber__ has joined #ruby
reber_ has quit [Ping timeout: 265 seconds]
mossplix_ has quit [Remote host closed the connection]
NODE has quit [Excess Flood]
NODE has joined #ruby
TCZ has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
turbo_choo has quit [Ping timeout: 268 seconds]
troulouliou_dev has joined #ruby
mossplix has joined #ruby
greengriminal has joined #ruby
feep[work] has left #ruby [#ruby]
bsdbandit-01 has quit [Remote host closed the connection]
mossplix has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Bye Bye]
rahult has joined #ruby
rahult has quit [Quit: Textual IRC Client: www.textualapp.com]
rahult has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
ua has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v3.8 Beta Build (2020/01/13 UTC) 64 Bit]
Tempesta has joined #ruby
mossplix has joined #ruby
AJA4350 has joined #ruby
anthology has quit [Ping timeout: 268 seconds]
antholog has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
iNs has quit [Excess Flood]
iNs has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
vondruch_ has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
william11 has joined #ruby
mossplix has quit [Ping timeout: 265 seconds]
iNs has quit [Ping timeout: 240 seconds]
iNs has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
catbusters has joined #ruby
turbo_choo has joined #ruby
mossplix has joined #ruby
markopasha has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
william11 has quit [Ping timeout: 265 seconds]
fphilipe_ has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
matheusmoreira has quit [Quit: leaving]
fphilipe_ has quit [Ping timeout: 268 seconds]
fuzzface has joined #ruby
fphilipe_ has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
fphilipe_ has quit [Ping timeout: 260 seconds]
reber_ has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber__ has quit [Ping timeout: 258 seconds]
fuzzface has quit [Quit: Leaving]
NODE has quit [Excess Flood]
NODE has joined #ruby
lucasb has joined #ruby
anveo has joined #ruby
dviola has joined #ruby
bmurt has joined #ruby
alexherbo29 has joined #ruby
TCZ has joined #ruby
alex`` has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo29 is now known as alexherbo2
alex`` has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
guardian has quit [Ping timeout: 268 seconds]
dviola has quit [Quit: WeeChat 2.7]
bmurt has quit [Ping timeout: 272 seconds]
fphilipe_ has joined #ruby
gitter1234 has quit [Quit: Connection closed for inactivity]
fphilipe_ has quit [Ping timeout: 268 seconds]
fphilipe_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ropeney has quit [Quit: ZNC 1.7.4 - https://znc.in]
dionysus69 has quit [Quit: dionysus69]
mossplix has quit [Remote host closed the connection]
dionysus69 has joined #ruby
fphilipe_ has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
mossplix has quit [Ping timeout: 268 seconds]
TCZ has quit [Quit: Bye Bye]
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
ropeney has joined #ruby
fphilipe_ has joined #ruby
BuildTheRobots has quit [Remote host closed the connection]
twodayslate has quit [Remote host closed the connection]
siasmj has quit [Remote host closed the connection]
d10n-work has quit [Remote host closed the connection]
schne1der has joined #ruby
fphilipe_ has quit [Ping timeout: 260 seconds]
fphilipe_ has joined #ruby
twodayslate has joined #ruby
dionysus69 has quit [Quit: dionysus69]
siasmj has joined #ruby
mossplix has joined #ruby
d10n-work has joined #ruby
BuildTheRobots has joined #ruby
dionysus69 has joined #ruby
catbusters has quit [Quit: Connection closed for inactivity]
fphilipe_ has quit [Ping timeout: 240 seconds]
DaRock has quit [Ping timeout: 258 seconds]
duderonomy has joined #ruby
gnufr33d0m has joined #ruby
markopasha has quit [Remote host closed the connection]
mwlang has joined #ruby
infinityfye has quit [Quit: Leaving]
greengriminal has quit [Quit: Leaving]
Mrgoose845701915 has quit [Quit: The Lounge - https://thelounge.chat]
GodFather has joined #ruby
fig-le-deunch has joined #ruby
d10n-work has quit [Remote host closed the connection]
twodayslate has quit [Remote host closed the connection]
siasmj has quit [Remote host closed the connection]
BuildTheRobots has quit [Remote host closed the connection]
pizzaiolo has quit [Max SendQ exceeded]
teclator has quit [Ping timeout: 268 seconds]
twodayslate has joined #ruby
d10n-work has joined #ruby
siasmj has joined #ruby
BuildTheRobots has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
pizzaiolo has joined #ruby
teclator has joined #ruby
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
wald0 has joined #ruby
pwnd_nsfw` has joined #ruby
DTZUZO has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
wald0 has quit [Read error: Connection reset by peer]
fphilipe_ has joined #ruby
wald0 has joined #ruby
anveo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fig-le-deunch has quit [Quit: Konversation terminated!]
fig-le-deunch has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
BTRE has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
gix has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
andikr has quit [Remote host closed the connection]
chalkmonster has joined #ruby
AJA4351 has joined #ruby
mossplix has quit [Remote host closed the connection]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
cthu| has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
wald0 has joined #ruby
davidw has joined #ruby
sergioro has joined #ruby
orbyt_ has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
gitter1234 has joined #ruby
<gitter1234> Hi! I'm trying to make it so that users can log in with a username. But for this part - https://github.com/heartcombo/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address#tell-devise-to-use-login-in-the-authentication_keys - do I just copy/paste the ActiveRecord code into my user.rb and that's it?
<gitter1234> Do I put it in under `private`?
BTRE has joined #ruby
NODE has quit [Quit: changing servers]
fphilipe_ has quit [Ping timeout: 265 seconds]
NODE has joined #ruby
TCZ has joined #ruby
reber__ has joined #ruby
<phaul> gitter1234: have you tried? are there any errrors at which you are stuck?
chalkmonster has quit [Quit: WeeChat 2.7]
reber_ has quit [Ping timeout: 268 seconds]
<gitter1234> phaul: I'm about to try now, im just always confused about the private/protected stuff, lacking a proper understanding of the funadmentals :/
NODE has quit [Excess Flood]
NODE has joined #ruby
<phaul> quick summary: normal method can be called on object like object.method or on self with self.method or simply method. The last bit (calling without an explicit receiver) is what's disabled in private. Otherwise they are the same.
<al2o3-cr> &ri Module#private Module#protected gitter1234
<phaul> &ri Module#private gitter1234
<gitter1234> Cool!
<phaul> oh we are without bots
* phaul sigh
<al2o3-cr> ah, that explains it then :P
NODE has quit [Excess Flood]
NODE has joined #ruby
<gitter1234> heheh
<al2o3-cr> phaul: does &ri take multiple entries or just the one
<phaul> I think just one
<al2o3-cr> ah, ok ;)
NODE has quit [Excess Flood]
<al2o3-cr> i always forget because adaedra's version took 3 if i remember. noted though
NODE has joined #ruby
markopasha has joined #ruby
suukim has joined #ruby
<phaul> rubybot will do 4 then. :D
<phaul> doc I mean
mossplix has joined #ruby
greengriminal has joined #ruby
NODE has quit [Excess Flood]
<al2o3-cr> hehe nice ;)
NODE has joined #ruby
<al2o3-cr> jhass: pretty please may we have version 2.7 soon ;)
endorama has quit [Quit: No Ping reply in 180 seconds.]
NODE has quit [Excess Flood]
ellcs has quit [Ping timeout: 258 seconds]
NODE has joined #ruby
endorama has joined #ruby
NODE has left #ruby [#ruby]
NODE has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
markopasha has quit [Remote host closed the connection]
NODE has quit [Excess Flood]
xco has joined #ruby
<gitter1234> Btw, which of these guides should one follow? Both say they're dupes of one another. One has a commit that's more recent but the other has more commits combined: https://github.com/heartcombo/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address#tell-devise-to-use-login-in-the-authentication_keys vs.
NODE has joined #ruby
Swyper has quit [Remote host closed the connection]
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
mossplix has quit [Remote host closed the connection]
NODE has quit [Client Quit]
NODE has joined #ruby
<gitter1234> second one...
guardian` has joined #ruby
Swyper has joined #ruby
fphilipe_ has joined #ruby
phaul_ has quit [Ping timeout: 260 seconds]
fphilipe_ has quit [Ping timeout: 272 seconds]
zlogan has joined #ruby
TCZ has quit [Quit: Bye Bye]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
fig-le-deunch has quit [Quit: Konversation terminated!]
<adam12> gitter1234: Number of commits is probably a bad metric. More recent might be better.
<gitter1234> adam12: the second one does seem to have more refined code as well though...
<gitter1234> but i think im gonna ditch them both.. and just add display_name or something to my users table instead
kashike has quit [Ping timeout: 245 seconds]
FastJack has quit [Ping timeout: 264 seconds]
kashike has joined #ruby
mossplix has joined #ruby
antholog has quit [Ping timeout: 268 seconds]
antholog has joined #ruby
wildtrees has joined #ruby
rubydoc has joined #ruby
wildtrees has quit [Max SendQ exceeded]
wildtrees has joined #ruby
wildtrees has quit [Max SendQ exceeded]
wildtrees has joined #ruby
FastJack has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
jaequery has joined #ruby
rubydoc has quit [Remote host closed the connection]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
rubydoc has joined #ruby
<phaul> &ri BigDecimal.new
<rubydoc> Found no entry that matches class BigDecimal class method new
<phaul> yay, 2.7!
kujira has joined #ruby
suukim has quit [Quit: Konversation terminated!]
<phaul> &ri Enumerator::Producer
william11 has joined #ruby
william11 has quit [Client Quit]
william1 has joined #ruby
<leftylink> is it just my browser
<leftylink> or does that only say Producer and nothing else
<phaul> no, I haven't checked the link. I guess the documentation is still missing idk
sameerynho has joined #ruby
<phaul> I generate the list based on whats indexed at ruby-doc.org, and they prly just get the index from rdoc
<havenwood> phaul: nice!
<phaul> havenwood: thnx :) now all we need is a bump on carc.in version
<jhass> &>> RUBY_VERSION
<rubydoc> # => "2.7.0" (https://carc.in/#/r/8e9o)
<phaul> yay!
<jhass> al2o3-cr: sure, I just always forget about it
<jhass> so feel free to ping me once archlinux has the package :P
<havenwood> &>> Enumerator.produce('yay', &:reverse).take(5)
<rubydoc> # => ["yay", "yay", "yay", "yay", "yay"] (https://carc.in/#/r/8e9q)
<phaul> thank you jhass
<al2o3-cr> jhass: thank you very much jhass, greatly appreciated ;)
<havenwood> +1
<jhass> it really takes me like 10mins so, yeah, keep poking :)
<al2o3-cr> i'm on arch too, didn't come into the repos until 8th i think ;)
<al2o3-cr> jhass: but anyway thanks. you too phaul ;)
<leftylink> so, what new things can we show off now that carcinogen is 2.7
<leftylink> we can show off tally I guess
<leftylink> I am happy to finally have tally.
<al2o3-cr> pattern matching is the one follow.
<leftylink> any bugs?
<leftylink> not that I want to show my lack of faith
<jhass> flip flop is no longer deprecated!
<al2o3-cr> well it's new, so i'd imagine it won't be squeeky clean.
<jhass> some might consider that a bug :D
daed has quit [Quit: leaving]
sameerynho has quit [Quit: WeeChat 2.6]
sameerynho has joined #ruby
stryek has joined #ruby
<havenwood> &>> Hash.new { :foo }.transform_values { :bar }[:wombat]
<rubydoc> # => #<Proc:0x00005619b8e5a290 -e:4> (https://carc.in/#/r/8e9v)
<havenwood> ^ that's a bug
<havenwood> &>> Hash.new { :foo }.transform_values { :bar }[:wombat].call
<rubydoc> # => :foo (https://carc.in/#/r/8e9w)
<adam12> havenwood: I wonder if that's related to the Rack/Grape bug from a few daysa go.
<havenwood> adam12: Ooh, good point! A Square eng found it and reported it and a few minutes later Nobu fixed it.
<havenwood> Looks like it was introduced in this commit: https://github.com/ruby/ruby/commit/21994b7fd686f263544fcac1616ecf3189fb78b3
<phaul> &26>> Hash.new { :foo }.transform_values { :bar }[:wombat]
<rubydoc> # => nil (https://carc.in/#/r/8ea0)
<havenwood> adam12: Ah, I hadn't seen the most recent comments
<havenwood> Interesting
howdoi has joined #ruby
<phaul> I don't fully get the 2.6 behaviour either. Hash.new { :foo } is just {} with special default proc right? then transform_values should do nothing to it as it's run on the empty hash. Then why do we get nil?
NODE has quit [Excess Flood]
NODE has joined #ruby
<phaul> &26>> (Hash.new { :foo })[:wombat]
<rubydoc> # => :foo (https://carc.in/#/r/8ea1)
<phaul> this ^ I understand
<phaul> the nil confuses me
tvw has quit []
<jhass> &26>> Hash.new {|h, k| h[k] = :foo }.transform_values { :bar }[:wombat]
<rubydoc> # => nil (https://carc.in/#/r/8ea2)
<jhass> looks like it just strips the default proc
<jhass> &>> Hash.new {|h, k| h[k] = :foo }.transform_values { :bar }[:wombat]
<rubydoc> # => #<Proc:0x000055ed90e9ed18 -e:4> (https://carc.in/#/r/8ea3)
<jhass> and does that incorrectly in 2.7? 🤷
Swyper has quit [Remote host closed the connection]
<jhass> maybe it just (incorrectly) assigns Hash#default_proc to Hash#default
sergioro has quit [Quit: leaving]
sauvin has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has joined #ruby
markopasha has joined #ruby
NL3limin4t0r_ark has quit [Ping timeout: 265 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
NL3limin4t0r_ark has joined #ruby
<howdoi> when was the last time you used the space ship operator in production code?
<phaul> I think fairly common if one includes Comparable. Otherwise using it directly - never.
zdm has joined #ruby
<havenwood> howdoi: I agree with phaul. I define it when I include Comparable, and not otherwise.
<howdoi> phaul: havenwood okies, for Comparable, what were the production use cases? For test cases I can related, but trying to understand production use cases, thanks!
<havenwood> howdoi: It's only useful when you want to compare objects to see which is greater, less than or equal.
<havenwood> howdoi: More specifically, usually instances of objects.
<havenwood> howdoi: this_thing >= that_thing
reber__ has quit [Ping timeout: 272 seconds]
<havenwood> howdoi: It's used fairly extensively in Ruby core and stdlib, which is why you can compare things via ==, >=, <=, >, and <.
<havenwood> &>> Time.new > Time.new
<rubydoc> # => false (https://carc.in/#/r/8ea7)
<havenwood> howdoi: For example ^
<howdoi> nice, say you have an array of objects, that you need compare, will there be any such instance in production?
<havenwood> howdoi: If you implement #<=>, you can sort.
<havenwood> howdoi: (And include Comparable.)
Ai9zO5AP has joined #ruby
<howdoi> `how` part is kind of clear, tying to understand the `why` part, as in `why` in production one would want to compare, what would be the use cases. Caching? Network request comparison, schema validation? havenwood
<havenwood> howdoi: Why do you ever want to sort?
chalkmonster has joined #ruby
<havenwood> howdoi: It's used internally for things like #max, #min, #min_max, #sort, etc.
<havenwood> howdoi: Why would you ever want to know what's the most, or the least, or put things in order. That's wy.
<havenwood> why*
<havenwood> howdoi: In production, you still need to know what's biggest, smallest, or be able to sort. Right?
<havenwood> howdoi: Maybe I don't understand what you're asking.
<havenwood> howdoi: What is the most expensive car? Order these flowers by the color wheel. Select the loudest yodel.
<havenwood> howdoi: Give us a fake production domain, and we can give examples why you'd want to compare.
<howdoi> hah hah
TCZ has joined #ruby
<adam12> I'm not sure I've ever seen a namespaced Minitest unit test or spec. Has anybody seen one in the wild? Everyone seems to flat-namespace them at the top level.
<howdoi> let me rephrase, I am trying to collect few use cases where you would have to compare objects in prod. [CS theory]
<havenwood> howdoi: Consider comparing money amounts with currency. To be able to sort, you need to compare by total value.
<havenwood> howdoi: Or times with a timezone.
chalkmonster has quit [Quit: WeeChat 2.7]
<howdoi> Nice, thanks, will think on those lines.
<havenwood> howdoi: Which gem is the newest?
<howdoi> havenwood: sort by time
<havenwood> &>> Gem::Version.new('4.2') > Gem::Version.new('4.2a')
<rubydoc> # => true (https://carc.in/#/r/8ea9)
<havenwood> &>> [Gem::Version.new('4.2'), Gem::Version.new('4.1-dev'), Gem::Version.new('4.2a')].sort
<rubydoc> # => [#<Gem::Version "4.1.pre.dev">, #<Gem::Version "4.2a">, #<Gem::Version "4.2">] (https://carc.in/#/r/8eaa)
<havenwood> howdoi: You can look at tzinfo gem to see examples of Comparable in the wild there.
<howdoi> &>> [1,3,2] <=> [2,2,2]
<rubydoc> # => -1 (https://carc.in/#/r/8eab)
<havenwood> howdoi: Here's an example of comparing countries in TZInfo too: https://github.com/tzinfo/tzinfo/blob/8fdf06ed9a4b935864e19794187d091219de481a/lib/tzinfo/country.rb#L27
<havenwood> howdoi: Yes, you can look at Array#<=> to see the rules. https://docs.ruby-lang.org/en/2.7.0/Array.html#method-i-3C-3D-3E
<howdoi> return nil unless c.is_a?(Country)
<howdoi> code <=> c.code
<howdoi> nice
greengriminal has quit [Quit: Leaving]
Emmanuel_Chanel has joined #ruby
<phaul> return unless c.is_a?(Country) without explicit nil is the same. I think rubocop tells you off for this
tvw has joined #ruby
<phaul> tbh the whole guarding is a bit meh. Why not just embrace duck typing and allow any other that responds to code. And just let it blow up if someone gives something incompatible. anyways ... wasn't the question... just random thoughts
<phaul> &>> 'a' <=> 1
<rubydoc> # => nil (https://carc.in/#/r/8eac)
<phaul> hm. this seems to be the std way
<howdoi> :D
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ur5us has joined #ruby
davispuh has joined #ruby
ellcs has joined #ruby
markopasha has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 240 seconds]
jaequery has quit [Remote host closed the connection]
kujira has quit []
kujira has joined #ruby
markopasha has joined #ruby
daed has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
fphilipe_ has joined #ruby
cadeskywalker has quit [Ping timeout: 260 seconds]
fphilipe_ has quit [Ping timeout: 260 seconds]
zdm has quit [Quit: Leaving]
alex`` has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Ping timeout: 272 seconds]
cadeskywalker has joined #ruby
kujira has quit [Ping timeout: 268 seconds]
mossplix has quit [Remote host closed the connection]
jenrzzz has joined #ruby
manakanapa has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #ruby
mossplix_ has joined #ruby
Guest25175 has joined #ruby
Rob__ has joined #ruby
pwnd_nsfw` has quit [Read error: Connection reset by peer]
silviu has quit [Remote host closed the connection]
silviu has joined #ruby
alexherbo20 has joined #ruby
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo20 is now known as alexherbo2
Guest25175 has quit [Ping timeout: 268 seconds]
alexherbo2 has quit [Client Quit]
alexherbo2 has joined #ruby
cadeskywalker has quit [Ping timeout: 240 seconds]
mossplix_ has quit [Remote host closed the connection]
mossplix has joined #ruby
tvw has quit []
tvw has joined #ruby
schne1der has quit [Ping timeout: 260 seconds]
sameerynho has quit [Quit: WeeChat 2.6]
s2013 has joined #ruby
emilygch has joined #ruby
<emilygch> Hi, how can I convert d = "2019-04-01T00:00:00.000Z" to DateTime? DateTime.new(d) results inNameError: uninitialized constant DateTime
chalkmonster has joined #ruby
cadeskywalker has joined #ruby
<emilygch> oh, i forgot to require 'date'
<emilygch> it works now!
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
jaequery has joined #ruby
sergioro has joined #ruby
cd has joined #ruby
william1_ has quit [Ping timeout: 265 seconds]
alex`` has joined #ruby
davispuh has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
sameerynho has joined #ruby
sameerynho has quit [Client Quit]
sameerynho has joined #ruby
sameerynho has quit [Client Quit]
davispuh has joined #ruby
sameerynho has joined #ruby
sameerynho has quit [Client Quit]
sameerynho has joined #ruby
mossplix has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 265 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
rahult has joined #ruby
buckworst has quit [Ping timeout: 260 seconds]
rahult has quit [Client Quit]
buckworst has joined #ruby
FrankDW2 has quit [Read error: Connection reset by peer]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest97 has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
Guest97 is now known as estafermo
estafermo is now known as drake
drake has left #ruby [#ruby]
howdoi has quit [Quit: Connection closed for inactivity]
mossplix has joined #ruby
estafermo has joined #ruby
mossplix has quit [Ping timeout: 258 seconds]
buckworst has quit [Ping timeout: 265 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
buckworst has joined #ruby
buckworst has quit [Client Quit]
mwlang has quit [Quit: mwlang]
estafermo has quit [Quit: Textual IRC Client: www.textualapp.com]
NODE has quit [Excess Flood]
NODE has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
phenom_ has quit [Ping timeout: 260 seconds]
rahult has joined #ruby
NODE has quit [Excess Flood]
william1 has quit [Ping timeout: 240 seconds]
NODE has joined #ruby
sgen has joined #ruby
emilygch has quit [Ping timeout: 260 seconds]
s3nd1v0g1us has joined #ruby
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
davispuh has quit [Ping timeout: 240 seconds]
markopasha has quit [Ping timeout: 268 seconds]
wald0 has joined #ruby
TCZ has quit [Quit: Bye Bye]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
davispuh has joined #ruby
sergioro has quit [Quit: leaving]
wald0 has quit [Read error: Connection reset by peer]
sergioro has joined #ruby
wald0 has joined #ruby
howdoi has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
wald0 has quit [Read error: Connection reset by peer]
_phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
wald0 has joined #ruby
turbo_choo has quit [Ping timeout: 240 seconds]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
tvw has quit []
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
phenom has joined #ruby
brool has joined #ruby
wald0 has joined #ruby
wald0 has quit [Client Quit]
TCZ has joined #ruby
DaRock has joined #ruby