havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.2, 2.5.5, 2.4.6: 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!
yield has quit [Ping timeout: 255 seconds]
nuh^ has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
segy has quit [Quit: ZNC - http://znc.in]
yield has joined #ruby
ellcs1 has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
yield has quit [Ping timeout: 246 seconds]
segy has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 250 seconds]
jcarl43 has quit [Quit: WeeChat 2.4]
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
AJA4350 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
AJA4350 has joined #ruby
Swyper has joined #ruby
SeepingN_ has quit [Quit: The system is going down for reboot NOW!]
Swyper has quit [Remote host closed the connection]
yield has joined #ruby
RiPuk has quit [Ping timeout: 250 seconds]
yield has quit [Ping timeout: 250 seconds]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
mangold has joined #ruby
AJA4350 has quit [Remote host closed the connection]
zachk has quit [Quit: Leaving]
segy has quit [Quit: ZNC - http://znc.in]
mangold has quit [Quit: This computer has gone to sleep]
doodlebug has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
Swyper has joined #ruby
segy has joined #ruby
_whitelogger has joined #ruby
GodFather has joined #ruby
Swyper has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
w0lver1n3 has joined #ruby
bambanx has joined #ruby
Swyper has quit [Remote host closed the connection]
mangold has joined #ruby
w0lver1n3 has quit []
Azure has joined #ruby
GodFather has quit [Remote host closed the connection]
_whitelogger has joined #ruby
frem has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
segy has quit [Quit: ZNC - http://znc.in]
LtHummus has quit [Read error: Connection reset by peer]
LtHummus has joined #ruby
yield has joined #ruby
Swyper has joined #ruby
yield has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
segy has joined #ruby
kent\n has quit [Quit: No Ping reply in 180 seconds.]
kent\n has joined #ruby
cd has quit [Quit: cd]
jenrzzz has joined #ruby
agent_white has quit [Quit: leaving]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
wallace_mu has joined #ruby
Swyper has joined #ruby
<wallace_mu> Guys, is cache log in rails log file for redis cache or memcache log how do i tell?
<wallace_mu> oops wrong room
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
t0xik has joined #ruby
wallace__ has joined #ruby
wallace_mu has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
yield has joined #ruby
brool has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
kapil____ has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
LtHummus has quit [Quit: ZNC 1.7.3 - https://znc.in]
segy has joined #ruby
LtHummus has joined #ruby
Swyper has quit [Remote host closed the connection]
Ai9zO5AP has joined #ruby
Tharbakim has joined #ruby
Tharbakim has quit [Changing host]
Tharbakim has joined #ruby
Swyper has joined #ruby
agrecascino has quit [Ping timeout: 250 seconds]
agrecascino has joined #ruby
code_zombie has quit [Quit: Leaving]
Swyper has quit [Remote host closed the connection]
jottr has joined #ruby
mhlei has joined #ruby
i1nfusion has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 255 seconds]
i1nfusion has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
segy has joined #ruby
aupadhye has joined #ruby
gix- has quit [Ping timeout: 246 seconds]
Puffball has quit [Remote host closed the connection]
rindolf has joined #ruby
jottr has joined #ruby
Swyper has joined #ruby
sidx64 has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
segy has quit [Ping timeout: 246 seconds]
elomatreb has quit [Quit: mep mep]
Fusl has quit [Remote host closed the connection]
elomatreb has joined #ruby
Fusl has joined #ruby
ricekrispie has joined #ruby
ricekrispie2 has quit [Ping timeout: 245 seconds]
segy has joined #ruby
DmitryBochkarev has joined #ruby
conta has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
mhlei has quit [Remote host closed the connection]
mhlei has joined #ruby
Inline has quit [Quit: Leaving]
jottr has joined #ruby
sauvin has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
jenrzzz has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]
bambanx has quit [Quit: Leaving]
jottr has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
stoffus has joined #ruby
stoffus has quit [Quit: leaving]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
hightower3 has joined #ruby
salasrod has quit [Read error: Connection reset by peer]
tdy has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 246 seconds]
hightower3 has quit [Changing host]
hightower3 has joined #ruby
salasrod has joined #ruby
jottr has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 246 seconds]
cschneid has quit [Remote host closed the connection]
schleppel has joined #ruby
cschneid has joined #ruby
suukim has joined #ruby
cschneid has quit [Ping timeout: 255 seconds]
snickers has joined #ruby
aupadhye has joined #ruby
jinie_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
clemens3 has joined #ruby
reber has joined #ruby
andikr has joined #ruby
jinie has joined #ruby
cschneid has joined #ruby
jottr has joined #ruby
DTZUZO has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
ellcs1 has joined #ruby
waheedi has joined #ruby
nowhere_man has joined #ruby
ellcs1 has quit [Ping timeout: 240 seconds]
<mhlei> hello. can a instance method visit its member variable without the prefix @? while the member variable is declared as @name
TomyWork has joined #ruby
cschneid has joined #ruby
sidx64_ has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
sidx64 has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 245 seconds]
Hobbyboy|BNC has joined #ruby
darkphnx480 has joined #ruby
<ytti> mhlei, no, but if youhave attr_reader getter method is created for you, in which case, yes
fmccann_ has joined #ruby
Hobbyboy has quit [Quit: I think the BNC broke.]
darkphnx48 has quit [Quit: Ping timeout (120 seconds)]
fmccann has quit [Read error: Connection reset by peer]
<ytti> 'member variable' is a term which i had to guess what you mean, as it's not term relevant to ruby
haylon has quit [Remote host closed the connection]
tris has quit [Ping timeout: 245 seconds]
schleppel has quit [Remote host closed the connection]
dust_ has joined #ruby
cgfbee has quit [Ping timeout: 245 seconds]
infernix has quit [Ping timeout: 245 seconds]
Prira has quit [Remote host closed the connection]
sidx64 has joined #ruby
harmaahylje has quit [Ping timeout: 245 seconds]
rprimus_ has quit [Ping timeout: 245 seconds]
haylon has joined #ruby
dostoyevsky has quit [Ping timeout: 245 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
sidx64_ has quit [Ping timeout: 250 seconds]
harmaahylje has joined #ruby
rprimus has joined #ruby
dostoyevsky has joined #ruby
tris has joined #ruby
Prira has joined #ruby
Mon_Ouie has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
infernix has joined #ruby
prestorium has joined #ruby
cgfbee has joined #ruby
za1b1tsu has joined #ruby
alem0lars has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
za1b1tsu_ has joined #ruby
jottr has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
za1b1tsu has quit [Remote host closed the connection]
paraxial8 has quit [Quit: Ping timeout (120 seconds)]
paraxial85 has joined #ruby
cschneid has joined #ruby
cschneid has quit [Ping timeout: 255 seconds]
<mhlei> thank you. ytti.
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwnd_nsfw` has quit [Ping timeout: 246 seconds]
cschneid has joined #ruby
jenrzzz has joined #ruby
cschneid has quit [Ping timeout: 246 seconds]
cschneid has joined #ruby
RiPuk has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
themsay has quit [Read error: Connection reset by peer]
<mhlei> ytti. how do you think the variable `query` in 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/project_search_results.rb#L116'. it's not the getter variable.
themsay has joined #ruby
DarthGandalf has joined #ruby
<mhlei> it is just the augument of the initialize method.
SanguineAnomaly has quit [Ping timeout: 245 seconds]
arand has quit [Ping timeout: 245 seconds]
arand has joined #ruby
kapil____ has joined #ruby
SanguineAnomaly has joined #ruby
mhlei has quit [Read error: Connection reset by peer]
cschneid has quit [Ping timeout: 255 seconds]
mhlei has joined #ruby
<ytti> mhlei, did you check the parent class, perhaps it implementes query method?
cschneid has joined #ruby
ur5us has joined #ruby
<mhlei> oh, you are right. it really has .
cschneid has quit [Ping timeout: 252 seconds]
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
cschneid has joined #ruby
claudiuinberlin has joined #ruby
kyrylo has joined #ruby
sidx64 has joined #ruby
cschneid has quit [Ping timeout: 245 seconds]
D9 has quit [Read error: Connection reset by peer]
D9 has joined #ruby
esrse has joined #ruby
moei has joined #ruby
interruptinuse has left #ruby [#ruby]
postmodern has quit [Quit: Leaving]
i1nfusion has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 244 seconds]
cschneid has joined #ruby
i1nfusion has joined #ruby
alem0lars has quit [Remote host closed the connection]
alem0lars has joined #ruby
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
nowhereman has joined #ruby
doodlebug has quit [Ping timeout: 245 seconds]
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
t0xik has quit [Quit: Connection closed for inactivity]
conta has quit [Ping timeout: 246 seconds]
LtHummus has quit [Ping timeout: 255 seconds]
yield has quit [Remote host closed the connection]
yield has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LtHummus has joined #ruby
za1b1tsu_ has quit [Remote host closed the connection]
jottr has joined #ruby
yield has quit [Remote host closed the connection]
yield has joined #ruby
doodlebug has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
esrse has quit [Ping timeout: 268 seconds]
sidx64 has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mangold has joined #ruby
sidx64 has joined #ruby
lxsameer has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
cschneid has quit [Ping timeout: 244 seconds]
TvL2386_ has quit [Quit: leaving]
TvL2386 has joined #ruby
queip has quit [Quit: bye, freenode]
nowhereman has quit [Ping timeout: 246 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
i1nfusion has quit [Remote host closed the connection]
queip has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
KeyJoo has joined #ruby
conta has joined #ruby
Swyper has joined #ruby
Fusl has quit [Remote host closed the connection]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fusl has joined #ruby
Swyper has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
_ikke_ has quit [Quit: WeeChat 2.3]
_ikke_ has joined #ruby
HendrikPeter has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
cschneid has joined #ruby
sidx64 has joined #ruby
doodleb10 has joined #ruby
keden has quit [Quit: WeeChat 2.4]
doodlebug has quit [Ping timeout: 245 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mat_bug has joined #ruby
Swyper has joined #ruby
d^sh has quit [Ping timeout: 268 seconds]
sidx64 has joined #ruby
d^sh has joined #ruby
Swyper has quit [Ping timeout: 245 seconds]
doodleb10 has quit [Read error: Connection reset by peer]
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
doodlebug has joined #ruby
hanmac1 has joined #ruby
apparition has joined #ruby
bokwoon has joined #ruby
yield has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 268 seconds]
cschneid has quit [Ping timeout: 250 seconds]
kujira has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
ldnunes has joined #ruby
mhlei has quit [Remote host closed the connection]
mhlei has joined #ruby
blaguvest has joined #ruby
Some-body_ has joined #ruby
nowhereman has joined #ruby
DarthGandalf has quit [Ping timeout: 252 seconds]
Some-body_ is now known as DarthGandalf
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RedSnarf has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
daniel____ has quit [Read error: Connection reset by peer]
daniel____ has joined #ruby
vondruch has joined #ruby
sidx64 has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
cschneid has joined #ruby
ogurk_ has joined #ruby
jottr has joined #ruby
<ogurk_> is rubygems using OS certs for accessing rubygems? I'm proxy rubygems via artifatory that's fronted with internal certs. While trying to install gem I'm getting ssl verify error.
<ogurk_> internal ca is added locally - but apparently not used
ferr has joined #ruby
apg has joined #ruby
apg has joined #ruby
apg has quit [Changing host]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
stryek has joined #ruby
ujjain has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jottr has quit [Ping timeout: 240 seconds]
AndroidKitKat has quit [Quit: バイバイ〜!]
AndroidKitKat has joined #ruby
r3m is now known as Pascal
Pascal is now known as r3m
AndroidKitKat has quit [Client Quit]
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
s3nd1v0g1us has joined #ruby
AndroidKitKat has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndroidKitKat has quit [Client Quit]
mondz has joined #ruby
AndroidKitKat has joined #ruby
hightower3 has quit [Ping timeout: 246 seconds]
andikr has quit [Ping timeout: 255 seconds]
andikr has joined #ruby
aupadhye has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
cschneid has quit [Ping timeout: 255 seconds]
bokwoon has quit [Ping timeout: 246 seconds]
ogurk_ has quit [Remote host closed the connection]
lucasb has joined #ruby
apparition has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 250 seconds]
KeyJoo has quit [Quit: KeyJoo]
jottr has joined #ruby
<Bish> someone having tried attaching files with the mailg em?
<Bish> i tried mail["test.csv"] = content_of_file
<Bish> and its also appended in the mail, but the client doesnt show theres a file attached
<Bish> while gmail does :o
bokwoon has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wallace__ has quit []
wallace_mu has joined #ruby
<Bish> Content-Type: text/csv;\r\n charset=UTF-8;\r\n filename=lol.csv
<Bish> it seems to add newslines in a content section of a field
<Bish> (m=Mail.new).attachments["lol.csv"] = "test";p m.to_s
<Bish> can anyone confirm?
<Bish> >> require 'mail'
<Bish> &> require 'mail'
<rubydoc> parser error at position 0 around `>'
<Bish> it's odd, i see the code and it has those thing snot in there
<adam12> Bish: Not super familiar with the Mail gem directly (usually use it through Roda) but have you looked at the `add_file` method?
<Bish> does it the same way, as it seems
<Bish> as you can see it does the same thing :/ adds \r\n for some reason
<Bish> inside a header value.. while \r\n is used to seperate heder values
DmitryBochkarev has quit [Ping timeout: 246 seconds]
<Bish> seems like thunderbbird doesnt like this one
andikr has quit [Ping timeout: 246 seconds]
<Bish> can you deliver a mail like that to your thunderbird of your choice?
samort7 has joined #ruby
andikr has joined #ruby
wallace_mu has quit []
fluxAeon has joined #ruby
krawchyk has joined #ruby
beilabs has joined #ruby
<adam12> Bish: Loads OK here. Thunderbird 60.6.1 (32-bit) Windows.
<Bish> m.parts.first.header.fields.map(&:encoded)
<Bish> this doesnt look correc
<Bish> tContent-Type: text/plain;\r\n charset=UTF-8\r\
beilabs_ has quit [Ping timeout: 268 seconds]
<Bish> do you think this is a bug?
mhlei has quit [Quit: Leaving]
<adam12> Bish: The \r\n inside the header?
<Bish> inside the VALUE of the header
suukim has quit [Quit: Konversation terminated!]
<Bish> trying to find out right now, why
tdy has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
<Bish> m.parts.first.header.fields.map(&:encoded)
beilabs has joined #ruby
cschneid has joined #ruby
<Bish> ofcourse the "encoded" method is nowhere to be found
<Bish> i hate that gem
<Bish> it works much better than its code quality suggests
yield has joined #ruby
duderonomy has joined #ruby
DmitryBochkarev has joined #ruby
yield has quit [Ping timeout: 246 seconds]
za1b1tsu has joined #ruby
<Bish> there are alooot of issues on attachments with that
<Bish> interesting
cschneid has quit [Remote host closed the connection]
cschneid has joined #ruby
<Bish> holy shit what is that crap
<Bish> field has an attribute field
<Bish> abstraction.jgp
<Bish> adam12: jeremyevans is the last one committing to that :)
<adam12> Bish: which?
<Bish> mail
<Bish> this seems to be the line that does that adding of \r\n
<Bish> it looks pretty intentional?
<Bish> but wrong?
HendrikPeter has quit [Ping timeout: 258 seconds]
<Bish> i can't find references that want it that way, no clue why he does ti
Rapture has joined #ruby
conta has quit [Ping timeout: 268 seconds]
cschneid has quit []
<adam12> Bish: Are you sure this is the issue? Looking at the RFC, "folding" is permitted to break up lines, by using a \r\n\s sequence.
<adam12> (not specifically that sequence but "a CRLF may be inserted before any WSP").
jenrzzz has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
jenrzzz has quit [Ping timeout: 245 seconds]
mat_bug has quit []
galaxie has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 252 seconds]
galaxie has joined #ruby
RedSnarf has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
polishdub has joined #ruby
krawchyk has quit [Ping timeout: 245 seconds]
conta has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
daniel__ has joined #ruby
Swyper has joined #ruby
daniel____ has quit [Ping timeout: 246 seconds]
rippa has joined #ruby
nowhereman has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
s3nd1v0g1us has quit [Read error: Connection reset by peer]
daniel__ has quit [Quit: Leaving]
daniel____ has joined #ruby
Swyper has joined #ruby
zachk has joined #ruby
sylario has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dbugger has joined #ruby
DmitryBochkarev has quit [Remote host closed the connection]
mondz has quit [Ping timeout: 250 seconds]
DmitryBochkarev has joined #ruby
alem0lars has quit [Ping timeout: 246 seconds]
Inline has joined #ruby
jottr_ has joined #ruby
UnknownSoldier has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 246 seconds]
donofrio has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
vulcan has joined #ruby
Swyper has quit [Remote host closed the connection]
donofrio has joined #ruby
conta2 has joined #ruby
mondz has joined #ruby
mondz has quit [Remote host closed the connection]
mondz has joined #ruby
my-nick has joined #ruby
my-nick has quit [Client Quit]
conta2 has quit [Quit: conta2]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
Swyper has joined #ruby
ferr has quit [Quit: WeeChat 2.4]
eddof13 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
neovalis0 has joined #ruby
clemens3 has quit [Ping timeout: 255 seconds]
lxsameer has quit [Ping timeout: 246 seconds]
nowhereman has joined #ruby
yield has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jottr has joined #ruby
mondz has quit [Quit: ERC (IRC client for Emacs 26.1)]
jenrzzz has joined #ruby
mondz has joined #ruby
prestorium has quit [Ping timeout: 246 seconds]
brool has joined #ruby
jottr_ has quit [Ping timeout: 255 seconds]
wallace_mu has joined #ruby
yield has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
mondz has quit [Remote host closed the connection]
my-nick has joined #ruby
my-nick has quit [Client Quit]
hxegon has joined #ruby
waheedi has quit [Quit: waheedi]
orbyt_ has quit [Client Quit]
neovalis0 has quit [Ping timeout: 245 seconds]
mondz has joined #ruby
jcarl43 has joined #ruby
orbyt_ has joined #ruby
polishdub has quit [Quit: leaving]
orbyt_ has quit [Ping timeout: 246 seconds]
hxegon has quit [Remote host closed the connection]
hxegon has joined #ruby
orbyt_ has joined #ruby
polishdub has joined #ruby
neovalis0 has joined #ruby
dviola has joined #ruby
neovalis0 has quit [Ping timeout: 245 seconds]
gix has joined #ruby
aqd has joined #ruby
vulcan has quit [Quit: Leaving]
neovalis0 has joined #ruby
dellavg_ has joined #ruby
yield has joined #ruby
hightower3 has joined #ruby
jenrzzz has joined #ruby
waheedi has joined #ruby
duderonomy has joined #ruby
yield has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
clemens3 has joined #ruby
conta has quit [Remote host closed the connection]
mwlang has joined #ruby
<mwlang> Typically when I want to not have to do a check if a variable contains an array of values before starting a loop, I’ll do something like Array(foo).each { … } Works fairly well except for when foo is a Hash.
<mwlang> Array({foo: :bar, fiz: :batz}) => l[[:foo, :bar], [:fiz, :batz]] instead of what I was expecting, which would be: [{foo: :bar}]
hiroaki has joined #ruby
<mwlang> although I can work around this with conditional, I’m curious as to why Hashes are treated differently by the Array() “cast” method than other types are.
brool has quit [Quit: WeeChat 2.4]
brool has joined #ruby
<mwlang> looks like I can get away with not converting Hash variable into arrays themselves by using [foo].flatten.each { … }
gregf_ has quit [Ping timeout: 256 seconds]
<phaul> you haven't told us why you would do this, it really feels xy problem to me
<ytti> i use [var].flatten pattern a lot, when i want method to accept value or list of values
<ytti> but i'm not sure how this applies to hash, because are you then setting they key or value?
neovalis0 has quit [Ping timeout: 246 seconds]
<ytti> you have just one variable, how do you create dummy hash out of it?
<ytti> like you can do {}.merge(hash).each
dellavg_ has quit [Ping timeout: 246 seconds]
<ytti> but i don't understand where it would make sense
<phaul> [*var] is a bit more succint maybe
yield has joined #ruby
alem0lars has joined #ruby
bokwoon has quit [Quit: WeeChat 2.5-dev]
<mwlang> well, I am parsing an XML document. if an element appears multiple times, it’s returned as an array…it it appears only once, it’s returned as just that element (not in an array)
<mwlang> so to be “safe” in following nested sections, I want to cast to Array so I always “have an array” and then loop to go deeper in the nest.
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Xiti` has quit [Quit: Xiti`]
yield has quit [Ping timeout: 245 seconds]
<phaul> and if you get a hash that's just one element?
<mwlang> correct.
Xiti has joined #ruby
<phaul> [elem].flatten as ytti said or [*elem] as I said, whichever you like more
<mwlang> so [foo] on an array gives me [[foo]] while [foo] on hash gives me [foo]. Thus the flatten call to keep things unchange.
cloaked1 has joined #ruby
<mwlang> right. I already came to that conclusion. I’m just wondering about the reasoning behind ruby treating hashes differently with the Array cast.
<mwlang> seems to violate principle of least surprise, at least for me.
<phaul> the OO aproach would be to return [] or at least the same type from xml parsing
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mwlang> I agree with you on that. but I didn’t write the XML => hash parser, so I’m regularizing it after the fact.
<havenwood> mwlang: Ruby is the principle of least surprise for Matz, just Matz.
<mwlang> LOL — then he and I think too much alike…:-p
<havenwood> mwlang: The idea is that it's more useful generally to have Hashes destructure into pairs with #to_a, so you can move between Hash and Array.
<havenwood> &>> {aim: true}.to_a.to_h
<rubydoc> # => {:aim=>true} (https://carc.in/#/r/6p2e)
<mwlang> ah-ha. Now that makes sense to me from the design perspective.
sidx64 has joined #ruby
<mwlang> it’s rare that I go between arrays and hashes
<havenwood> &>> class Hash; def to_ary; [self] end end; Array.new({aim: true})
<rubydoc> # => [{:aim=>true}] (https://carc.in/#/r/6p2f)
<mwlang> except looping over key/value pairs of a flat hash, but that’s pretty much part of the Ruby syntax magic there.
<havenwood> mwlang: Kernel::Array uses #to_ary over #to_a if it's defined, so you can change its behavior by implementing #to_ary.
orbyt_ has joined #ruby
<havenwood> mwlang: But yeah, Hashes have a bit of an odd #to_a, so they can go to Arrays and back since Enumerable only uses Array as the reducing object.
<mwlang> Nice way to do that.
<mwlang> I only have one place in the code (so far) where I’m dealing with coercing a Hash variable into an array of Hash variables for all depths of processing elements in the XML, so getting fancy isn’t really called for here. But definitely a great tip to keep in mind for future.
duderonomy has joined #ruby
yield has joined #ruby
sidx64_ has joined #ruby
sidx64 has quit [Ping timeout: 250 seconds]
kujira has joined #ruby
postmodern has joined #ruby
<mwlang> speaking of looping hashes, has it always been possible to do this? {foo: 1, bar:2}.map {|k,v| puts [k,v].join(' => ')} => “foo => 1\nbar => 2”
<mwlang> I mean, using #map and #each and having both key and value in the loop
conta has joined #ruby
<mwlang> I used to use #each_pair for that, but at some point, I forgot the “_pair” when writing a loop and it worked.
cd has joined #ruby
<mwlang> made me wonder if I learnt wrongly in the beginning or if this capability came along after Ruby 1.8.6
<phaul> &20>> {a:1}.map {|k,v| "#{k} => #{v}" }
<rubydoc> # => ["a => 1"] (https://carc.in/#/r/6p2g)
<phaul> 2.0 has it
yield has quit [Ping timeout: 246 seconds]
cd has quit [Remote host closed the connection]
cd has joined #ruby
<phaul> so does 1.8 https://eval.in/1093419
r29v has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
Fusl has quit [Quit: K-Lined]
HendrikPeter has joined #ruby
<phaul> but that's 1.8.7 and you are asking 1.8.6 , so donno
Fusl has joined #ruby
doodlebug has joined #ruby
samort7 has quit [Quit: Page closed]
<mwlang> I did a little digging. I think it has always had ability to return two variables with Hash#each and Hash#each_pair made it clear two variables were passed, so I learned #each_pair for iterating hash keys way early on.
<mwlang> I’m sure back then I didn’t know that if I provided two variables, Ruby would intelligently assign individual variables.
<syndikate> In this example, the array inside gets created and destroyed each time the method is called, right? Is the reason being going out of scope?
<mwlang> @syndikate pretty sure that’s the case.
<syndikate> Ah okay, it would be the same in any language right?
<havenwood> syndikate: To prevent multiple Arrays, set that as a Constant - and for extra credit, freeze it.
<mwlang> depends on the language for sure.
<havenwood> syndikate: FRUIT = %w[apple mango].freeze
<havenwood> syndikate: Then in the method, just: FRUIT.include?(fruit)
<havenwood> syndikate: And add a frozen string literal for the String freezing
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtdowney has quit [Read error: Connection reset by peer]
<syndikate> Thanks, yeah, that's what I do havenwood, but that habit came to me from somewhere and was there without me thinking. So, I was just thinking about this now. I was curious for any language that would destroy objects after scope, this would be the same, right?
duderonomy has joined #ruby
<phaul> a language potentially could discover that that's constant data and optimize it out
<mwlang> @syndikate some languages that byte-compile may optimize away the array destruction on out of scope.
<havenwood> syndikate: Even a Ruby implementation like TruffleRuby might be able to optimize that away as well
jtdowney has joined #ruby
<syndikate> havenwood, Any string that is being used in a class I usually make it constant and freeze, and some arrays too.
<syndikate> Oh, okay. What languages are there such?
<mwlang> oh, gosh…I haven’t even thought about the variants other than MRI ruby as an option in years.
<mwlang> @syndikate python, crystal, java
sauvin has quit [Ping timeout: 246 seconds]
jtdowney has quit [Client Quit]
<mwlang> personally, I’d do what havenwood suggests just because having “magic” numbers and constants other than 0, 1, nil inside the methods is poor practice.
<syndikate> Oh python does that ? :O
jtdowney has joined #ruby
<Bish> adam12: okay, thanks :o
<havenwood> syndikate: maybe PyPy?
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mwlang> you’ll have to go ask the python experts, but I do know python pre-compiles pretty aggressively so it has strong potential to optimize static variables inside methods.
<syndikate> I didn't know it has such optimisations while ruby doesn't
<mwlang> two very different beasts
duderonomy has joined #ruby
jtdowney has quit [Quit: jtdowney]
jtdowney has joined #ruby
yield has joined #ruby
ruby-lang136 has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
duderonomy has quit [Client Quit]
conta has quit [Quit: conta]
ruby-lang136 has quit [Client Quit]
yield has quit [Ping timeout: 245 seconds]
Fira has joined #ruby
ellcs has joined #ruby
doodlebug has quit [Ping timeout: 255 seconds]
<syndikate> Ah well something new for today
doodleb4 has joined #ruby
hhzza has quit [Quit: Connection closed for inactivity]
duderonomy has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
orbyt_ has joined #ruby
segy has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<IGnorAND> def initialize(list_type: "ALL", search_term: , page: 1, page_size: 20, sort_by:) <- does this force one to specify a search_term? Or is it optional?
code_zombie has joined #ruby
<mwlang> @IGnorAND must specify…same for sort_by.
<mwlang> the rest of the parameters are optional since you provided defaults.
Ai9zO5AP has quit [Quit: WeeChat 2.4]
<mwlang> if you want everything optional…then use nil… (list_type: "ALL", search_term: nil, page: 1, page_size: 20, sort_by: nil)
r3m has quit [Quit: WeeChat 2.5-dev]
r3m has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
yield has joined #ruby
Swyper has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 240 seconds]
Rapture has joined #ruby
duderonomy has joined #ruby
yield has quit [Ping timeout: 268 seconds]
alem0lars has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
segy has joined #ruby
Swyper has quit [Ping timeout: 268 seconds]
orbyt_ has quit [Ping timeout: 245 seconds]
sidx64_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DmitryBochkarev has quit [Ping timeout: 250 seconds]
neovalis0 has joined #ruby
Pablo[m] has joined #ruby
eddof13 has quit [Quit: eddof13]
mondz has quit [Read error: Connection reset by peer]
Iarfen has joined #ruby
<Iarfen> hi!
Pablo[m] has left #ruby ["User left"]
<Iarfen> how I can use byebug? I'm trying to use it with rails but I don't understand where the console appears
lxsameer has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yield has joined #ruby
<miah> Iarfen: somewhere in your code, near the area you want to debug you need to add 'byebug' when ruby hits that method the console appears. its going to be in the same terminal as you started your application from.
yield has quit [Ping timeout: 246 seconds]
yoshida has joined #ruby
yoshida has quit [Client Quit]
Swyper has joined #ruby
hightower3 has quit [Ping timeout: 246 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
Swyper has quit [Remote host closed the connection]
segy has quit [Ping timeout: 246 seconds]
HendrikPeter has quit [Ping timeout: 255 seconds]
CustosLimen has left #ruby [#ruby]
segy has joined #ruby
<havenwood> Iarfen: Or you can use Pry with ByeBug: https://gist.github.com/palkan/d89757a90cfbeb047c63
<havenwood> (with the pry-rails and pry-byebug gems)
eddof13 has joined #ruby
kyrylo has joined #ruby
ellcs has joined #ruby
Swyper has joined #ruby
claudiuinberlin has joined #ruby
jenrzzz has joined #ruby
HendrikPeter has joined #ruby
yield has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
semtex-h has joined #ruby
semtex-h has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doodleb4 has quit [Read error: Connection reset by peer]
t0xik has joined #ruby
blaguvest has quit [Ping timeout: 246 seconds]
mwlang has quit [Quit: mwlang]
skarlso has quit [Quit: The Lounge - https://thelounge.chat]
yield has quit [Ping timeout: 255 seconds]
doodlebug has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
skarlso has joined #ruby
eddof13 has quit [Quit: eddof13]
wndxlori has joined #ruby
wndxlori has quit [Client Quit]
segy has quit [Ping timeout: 255 seconds]
skarlso has quit [Client Quit]
skarlso has joined #ruby
doodlebug has joined #ruby
eddof13 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
segy has joined #ruby
jenrzzz has joined #ruby
HendrikPeter has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 244 seconds]
HendrikPeter has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
apg has quit [Ping timeout: 246 seconds]
themsay has quit [Ping timeout: 245 seconds]
hxegon has left #ruby ["Using Circe, the loveliest of all IRC clients"]
skarlso has quit [Quit: The Lounge - https://thelounge.chat]
hxegon has joined #ruby
skarlso has joined #ruby
skarlso has quit [Client Quit]
yield has joined #ruby
skarlso has joined #ruby
lucasb has joined #ruby
hxegon has left #ruby [#ruby]
hxegon has joined #ruby
Swyper has quit [Remote host closed the connection]
orbyt_ has joined #ruby
yield has quit [Ping timeout: 246 seconds]
skarlso has quit [Client Quit]
Dbugger has quit [Quit: Leaving]
vondruch has quit [Ping timeout: 268 seconds]
skarlso has joined #ruby
HendrikPeter has quit [Ping timeout: 246 seconds]
AJA4351 has joined #ruby
orbyt_ has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Ping timeout: 252 seconds]
AJA4351 is now known as AJA4350
HendrikPeter has joined #ruby
orbyt_ has joined #ruby
RiPuk has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
RiPuk has joined #ruby
hightower2 has joined #ruby
segy has quit [Ping timeout: 245 seconds]
lxsameer has quit [Ping timeout: 255 seconds]
Swyper has quit [Remote host closed the connection]
HendrikPeter has quit [Ping timeout: 245 seconds]
claudiuinberlin has joined #ruby
skarlso has quit [Quit: The Lounge - https://thelounge.chat]
skarlso has joined #ruby
dust_ has quit [Quit: Konversation terminated!]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
Swyper has joined #ruby
RiPuk has quit [Read error: Connection reset by peer]
segy has joined #ruby
RiPuk has joined #ruby
brool has quit [Quit: WeeChat 2.4]
UnknownSoldier has quit [Quit: HAUEH]
jottr has joined #ruby
nuh^ has quit [Ping timeout: 246 seconds]
nuh^ has joined #ruby
nuh^ has quit [Max SendQ exceeded]
nuh^ has joined #ruby
nuh^ has quit [Max SendQ exceeded]
nuh^ has joined #ruby
nuh^ has quit [Max SendQ exceeded]
nuh^ has joined #ruby
nuh^ has quit [Max SendQ exceeded]
nuh^ has joined #ruby
nuh^ has quit [Max SendQ exceeded]
themsay has joined #ruby
nuh^ has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #ruby
duderonomy has joined #ruby
ldnunes has quit [Quit: Leaving]
ur5us has joined #ruby
tdy has quit [Ping timeout: 255 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
dviola has quit [Quit: WeeChat 2.4]
yield has joined #ruby
claudiuinberlin has joined #ruby
RiPuk has quit [Ping timeout: 255 seconds]
claudiuinberlin has quit [Client Quit]
UnknownSoldier has joined #ruby
yield has quit [Ping timeout: 250 seconds]
reber has quit [Remote host closed the connection]
brool has joined #ruby
RiPuk has joined #ruby
n13z has joined #ruby
jottr has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
skryking has joined #ruby
Swyper has quit [Remote host closed the connection]
mangold has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
TheBloke has joined #ruby
SeepingN has joined #ruby
tdy has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
RiPuk has quit [Quit: ZNC 1.7.3 - https://znc.in]
RiPuk has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
RiPuk_ has joined #ruby
yield has joined #ruby
Swyper has joined #ruby
RiPuk has quit [Ping timeout: 246 seconds]
zapata has quit [Quit: WeeChat 2.4]
yield has quit [Ping timeout: 250 seconds]
Swyper has quit [Ping timeout: 245 seconds]
Iarfen has quit [Remote host closed the connection]
lxsameer has joined #ruby
jenrzzz has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
Alison` has quit [Quit: Leaving]
eddof13 has quit [Quit: eddof13]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
Alison` has joined #ruby
lord4163 has quit [Ping timeout: 250 seconds]
s3nd1v0g1us has joined #ruby
lord4163 has joined #ruby
Fernando-Basso has joined #ruby
hightower2 has quit [Ping timeout: 246 seconds]
neovalis_ has joined #ruby
shansen has quit [Ping timeout: 252 seconds]
eddof13 has joined #ruby
shansen has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nwradio8788879 has joined #ruby
nwradio878887 has quit [Ping timeout: 252 seconds]
vircung has quit [Ping timeout: 244 seconds]
doodlebug has quit [Ping timeout: 245 seconds]
vircung has joined #ruby
yield has joined #ruby
doodleb14 has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
clemens3 has quit [Ping timeout: 246 seconds]
clemens3_ has joined #ruby
yield has quit [Ping timeout: 245 seconds]
Alison` has quit [Quit: Leaving]
hxegon has quit [Ping timeout: 250 seconds]
hxegon has joined #ruby
orbyt_ has joined #ruby
doodleb14 has quit [Write error: Connection reset by peer]
jottr has joined #ruby
polishdub has quit [Quit: leaving]
Alison` has joined #ruby
moei has quit [Quit: Leaving...]
jottr has quit [Ping timeout: 245 seconds]
doodleb57 has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
jcalla has quit [Ping timeout: 250 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yield has joined #ruby
jcalla has joined #ruby
yield has quit [Ping timeout: 246 seconds]
rindolf has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
Swyper has joined #ruby
doodleb57 has quit [Read error: Connection reset by peer]
themsay has quit [Remote host closed the connection]
mangold has joined #ruby
banko has quit [Quit: Connection closed for inactivity]
doodlebug has joined #ruby
wallace_mu has quit [Remote host closed the connection]
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
neovalis0 has quit [Quit: Leaving]
neovalis_ has quit [Quit: Leaving]
ramfjord has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
brool has quit [Ping timeout: 257 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t0xik has quit [Quit: Connection closed for inactivity]
bambanx has joined #ruby
Swyper has quit [Remote host closed the connection]
code_zombie has quit [Quit: Leaving]
t0xik has joined #ruby
yield has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
eddof13 has quit [Quit: eddof13]
yield has quit [Ping timeout: 255 seconds]