baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 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!
Psy-Q has quit [Read error: Connection reset by peer]
Psy-Q has joined #ruby
fphilipe has joined #ruby
s3nd1v0g1us has joined #ruby
skryking__ has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
skryking_ has quit [Ping timeout: 250 seconds]
comet23 has quit [Quit: Connection closed for inactivity]
jottr has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has joined #ruby
Swyper has quit [Remote host closed the connection]
dar123 has quit [Client Quit]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
E3lit3h4XX0r666 has left #ruby [#ruby]
jottr has quit [Ping timeout: 246 seconds]
dar123 has joined #ruby
weird_error has joined #ruby
kyrylo has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
mostlybadfly has joined #ruby
chaus has quit []
jottr has joined #ruby
chaus has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
oncall-pokemon_ has joined #ruby
oncall-pokemon_ has quit [Client Quit]
chaus has quit []
oncall-pokemon_ has joined #ruby
oncall-pokemon_ is now known as oncall-pokemon
oncall-pokemon has quit [Client Quit]
oncall-pokemon has joined #ruby
jottr has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 245 seconds]
oncall-pokemon has quit []
oncall-pokemon has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
m_antis has quit [Read error: Connection reset by peer]
m_antis has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 244 seconds]
laaron has quit [Remote host closed the connection]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
orbyt_ has joined #ruby
Swyper has joined #ruby
fphilipe has joined #ruby
AJA4350 has quit [Quit: AJA4350]
bairyn has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
laaron has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laaron has quit [Remote host closed the connection]
houhoulis has joined #ruby
jottr has joined #ruby
Swyper has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
Azure has joined #ruby
laaron has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
laaron has quit [Remote host closed the connection]
jottr has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.4]
laaron has joined #ruby
aither has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 255 seconds]
braincrash has quit [Quit: bye bye]
aither has joined #ruby
jenrzzz has joined #ruby
braincrash has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
al2o3-cr has quit [Ping timeout: 246 seconds]
al2o3-cr has joined #ruby
imadper has joined #ruby
jelera has joined #ruby
bairyn is now known as ByronJohnson
Swyper has joined #ruby
Guest3556 is now known as ndrst
ndrst has quit [Changing host]
ndrst has joined #ruby
jottr has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
houhoulis has quit [Ping timeout: 246 seconds]
oncall-pokemon has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 246 seconds]
houhoulis has joined #ruby
imadper is now known as iMadUtilsMan
noobineer has joined #ruby
arescorpio has joined #ruby
bambanx has joined #ruby
fphilipe has joined #ruby
jottr has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ruby
jottr has joined #ruby
weteamsteve has quit [Read error: Connection reset by peer]
arescorpio has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 276 seconds]
marmotini_ has joined #ruby
houhoulis has quit [Remote host closed the connection]
CableNinja has joined #ruby
E3lit3h4XX0r666 has joined #ruby
jottr has joined #ruby
<CableNinja> hey guys. I'm trying to do an SSL server/client setup (straight tcp/ssl via TCP/SSL network sockets). I'm struggling to get a complete connection. using openssl_sclient I get correct info, but when I connect using the ruby client I get "unexpected message" on the client side, and "wrong version number" on the server side. Both are running on the same system, I updated to openssl 1.1.1b, and rebuilt ruby/openssl with it, but I still
<CableNinja> cannot get a successful connection.
jottr has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
xco has joined #ruby
kapil____ has joined #ruby
Xiti` has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
iMadUtil` has joined #ruby
bambanxx has joined #ruby
Xiti has quit [Ping timeout: 244 seconds]
Inline has quit [Quit: Leaving]
iMadUtilsMan has quit [Read error: Connection reset by peer]
jottr has joined #ruby
bambanx has quit [Ping timeout: 258 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 246 seconds]
conta has joined #ruby
Swyper has quit [Remote host closed the connection]
landakram has joined #ruby
fphilipe has joined #ruby
Swyper has joined #ruby
orbyt_ has joined #ruby
marmotini_ has quit [Ping timeout: 250 seconds]
xco has quit [Quit: xco]
ozzloy has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 276 seconds]
marmotini_ has joined #ruby
uranoss has quit [Quit: Connection closed for inactivity]
marmotini_ has quit [Ping timeout: 246 seconds]
ozzloy has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
hightower2 has joined #ruby
Swyper has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 250 seconds]
TheSpectre_ has joined #ruby
TheSpectre has quit [Ping timeout: 268 seconds]
bambanxx has quit [Quit: Leaving]
jottr has joined #ruby
CableNinja has quit [Quit: Leaving]
jottr has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
reber has joined #ruby
fphilipe has joined #ruby
tdy1 has quit [Quit: WeeChat 1.9.1]
tdy1 has joined #ruby
clemens3 has joined #ruby
jottr has joined #ruby
landakram has quit [Remote host closed the connection]
clemens3 has quit [Ping timeout: 268 seconds]
Dbugger has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
yuriii has joined #ruby
Tempesta_ has joined #ruby
arooni has quit [Ping timeout: 250 seconds]
Nilium has quit [Ping timeout: 250 seconds]
MuffinPimp has quit [Ping timeout: 250 seconds]
Nilium has joined #ruby
arooni has joined #ruby
Tempesta has quit [Ping timeout: 250 seconds]
MuffinPimp has joined #ruby
akem__ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has quit [Ping timeout: 258 seconds]
vondruch has quit [Quit: vondruch]
jottr has joined #ruby
iMadUtil` is now known as iMadUtilsMan
andikr has joined #ruby
clemens3 has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
sylario has joined #ruby
clemens3 has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
prestorium has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
zacts has joined #ruby
<zacts> hello #ruby
jefffrails35 has joined #ruby
waheedi has joined #ruby
hightower2 has joined #ruby
dhollinger has quit [Ping timeout: 246 seconds]
dhollinger has joined #ruby
jottr has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
jottr has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
E3lit3h4XX0r666 has quit [Ping timeout: 246 seconds]
Jonopoly has joined #ruby
jottr has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
andikr has quit [Ping timeout: 244 seconds]
andikr has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
_joes_ has joined #ruby
BH23 has joined #ruby
jottr has joined #ruby
_joes_ has quit [Ping timeout: 268 seconds]
BH23 has quit [Ping timeout: 246 seconds]
_joes_ has joined #ruby
BH23 has joined #ruby
clemens3 has joined #ruby
_joes_ has quit [Ping timeout: 255 seconds]
BH23 has quit [Ping timeout: 246 seconds]
andikr has quit [Ping timeout: 246 seconds]
conta has quit [Ping timeout: 258 seconds]
andikr has joined #ruby
alem0lars has joined #ruby
conta has joined #ruby
jefffrails35 has quit [Read error: Connection reset by peer]
jefffrails35 has joined #ruby
claudiuinberlin has joined #ruby
buckworst has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
cthu| has joined #ruby
cthulchu_ has quit [Ping timeout: 244 seconds]
cthulchu_ has joined #ruby
cthu| has quit [Ping timeout: 246 seconds]
m_antis_ has joined #ruby
m_antis has quit [Read error: Connection reset by peer]
vondruch has quit [Read error: Connection reset by peer]
jottr has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
suryc has joined #ruby
conta has quit [Ping timeout: 255 seconds]
buckworst has quit [Quit: Leaving]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
conta has joined #ruby
kyrylo has joined #ruby
vondruch has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
tdy1 has quit [Ping timeout: 246 seconds]
queip has quit [Ping timeout: 246 seconds]
wald0 has joined #ruby
jenrzzz has joined #ruby
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
queip has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
rainer_tm has joined #ruby
suryc has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
hightower2 has quit [Ping timeout: 244 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
_whitelogger has joined #ruby
cthu| has joined #ruby
cthulchu_ has quit [Ping timeout: 246 seconds]
_joes_ has joined #ruby
BH23 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
_joes_ has quit [Client Quit]
_joes_ has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
haivron has joined #ruby
ldnunes has joined #ruby
waheedi has quit [Quit: waheedi]
jottr has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
_joes_ has quit [Quit: _joes_]
_joes_ has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
kyrylo has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
jcalla has quit [Ping timeout: 244 seconds]
waheedi has joined #ruby
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
_joes_ has quit [Quit: _joes_]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
_joes_ has joined #ruby
jottr has joined #ruby
marmotini_ has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
hightower2 has joined #ruby
alem0lars_ has joined #ruby
vondruch_ has joined #ruby
lucasb has joined #ruby
alem0lars has quit [Ping timeout: 268 seconds]
Mia has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 246 seconds]
vondruch has quit [Ping timeout: 246 seconds]
vondruch_ is now known as vondruch
alem0lars_ has quit [Remote host closed the connection]
alem0lars has joined #ruby
pwnd_nsfw has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
gregf_ has quit [Ping timeout: 256 seconds]
_joes_ has quit [Ping timeout: 250 seconds]
BH23 has quit [Ping timeout: 276 seconds]
ech0s7 has joined #ruby
<ech0s7> https://onlinegdb.com/HkhiFOVoN why line 4 return false ?
fphilipe has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 268 seconds]
BH23 has joined #ruby
_joes_ has joined #ruby
Xiti` has quit [Quit: Xiti`]
claudiuinberlin has quit [Read error: Connection reset by peer]
jcalla has joined #ruby
Swyper has joined #ruby
pupsikov has joined #ruby
fphilipe has joined #ruby
jottr has joined #ruby
_joes_ has quit [Ping timeout: 244 seconds]
BH23 has quit [Ping timeout: 268 seconds]
cthu| has quit [Ping timeout: 258 seconds]
<adam12> ech0s7: Your keys are symbols. 'a' is a string.
<adam12> ech0s7: I bet if you `puts hash.key? :a` it would work :)
cthulchu has joined #ruby
<adam12> &>> { a: "a" }.key? :a
<rubydoc> # => true (https://carc.in/#/r/6t1g)
jottr has quit [Ping timeout: 246 seconds]
jelera has joined #ruby
vdl has quit [Quit: WeeChat 2.3]
BH23 has joined #ruby
_joes_ has joined #ruby
Swyper has quit [Remote host closed the connection]
shansen has quit [Remote host closed the connection]
cthulchu has quit [Max SendQ exceeded]
<ech0s7> adam12: it is possible to convert hash keys to symbols ?
krawchyk has joined #ruby
<ech0s7> adam12: I'm reading a json config file into an hash object and I would like to access the hash using obj[:key] instead of obj["key"]
<adam12> ech0s7: Couple methods. If you're using Rails, there's a symbolize_keys! method on Hash.
<adam12> ech0s7: If you're not, I believe JSON will accept an argument to symbolize keys/names.
<adam12> &ri JSON
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
<havenwood> ech0s7: +1 for JSON's: symbolize_names: true
<havenwood> ech0s7: you can always: transform_keys(&:to_sym)
<ech0s7> thanks havenwood
<ech0s7> why did you put the & ?
_joes_ has quit [Quit: _joes_]
_joes_ has joined #ruby
<Jonopoly> i think ive came to conclusion that ruby and selenium is a problem T_T
conta has quit [Quit: conta]
<Jonopoly> One of my features generates a file, I then can't seem to run that file.. T_T
jottr has joined #ruby
vdl has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron- has joined #ruby
Swyper has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
jottr has quit [Ping timeout: 246 seconds]
jmcgnh has quit [Quit: ZNC 1.7.1 - https://znc.in]
orbyt_ has joined #ruby
suukim has joined #ruby
_joes_ has quit [Ping timeout: 245 seconds]
BH23 has quit [Ping timeout: 258 seconds]
galaxie has quit [Ping timeout: 256 seconds]
marmotini_ has quit [Ping timeout: 255 seconds]
_joes_ has joined #ruby
BH23 has joined #ruby
ngw has joined #ruby
<ngw> hi *, is there an easy way to parse multipart data in plain ruby? I know Rack has the code for doing that but I'm building an AWS lambda, I feel silly requiring Rack for nothing
<adam12> ngw: I haven't seen anything but maybe you can dig through the CGI library in stdlib?
<adam12> ngw: Nevermind. I forgot that CGI.rb was a bit barren.
conta has joined #ruby
<ngw> I won't die I guess if I use Rack
<ngw> just hoped for something easier
<adam12> ngw: If it's just a single method I'd just lift and shift :)
Inline has joined #ruby
Xiti has joined #ruby
cthulchu has joined #ruby
<ngw> eh, it's quite out of scope with what I'm doing, I hate helpers/libs when completely out of scope with the project
gnufied has joined #ruby
BH23 has quit [Ping timeout: 258 seconds]
_joes_ has quit [Ping timeout: 258 seconds]
jottr has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua_ has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
jcarl43 has joined #ruby
Cthulu201 has joined #ruby
queip has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jelera has joined #ruby
ua_ has joined #ruby
jelera has quit [Client Quit]
queip has joined #ruby
ldnunes has quit [Ping timeout: 245 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus70 has joined #ruby
jottr has joined #ruby
dionysus70 is now known as dionysus69
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 245 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
kyrylo has joined #ruby
Swyper has quit [Remote host closed the connection]
cajone has joined #ruby
hightower2 has quit [Ping timeout: 245 seconds]
doodlebug has joined #ruby
jottr has joined #ruby
conta has quit [Quit: conta]
clemens3 has quit [Ping timeout: 245 seconds]
shansen has joined #ruby
elated has quit [Read error: Connection reset by peer]
ech0s7 has quit [Quit: Page closed]
fphilipe has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 246 seconds]
jelera has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
conta has joined #ruby
luminousnine has quit [Quit: Goodbye ~ Powered by LunarBNC]
luminousnine has joined #ruby
luminousnine has quit [Changing host]
luminousnine has joined #ruby
duderonomy has joined #ruby
clemens3 has joined #ruby
ta_ has joined #ruby
jottr has joined #ruby
fphilipe has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasb has quit [Quit: Connection closed for inactivity]
andikr has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
alem0lars has quit [Ping timeout: 258 seconds]
fphilipe has quit [Ping timeout: 258 seconds]
polishdub has joined #ruby
zacts has joined #ruby
jelera has joined #ruby
IanMalcolm has joined #ruby
nowhereman has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
Jonopoly has quit [Quit: WeeChat 2.4]
jottr has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy1 has joined #ruby
SeepingN has joined #ruby
gix has joined #ruby
ech0s7 has joined #ruby
jefffrails35 has quit [Remote host closed the connection]
<ech0s7> I'm looking for an elegant way to return an array from a function only if it is not empty
<ech0s7> could you advise a way ?
rippa has joined #ruby
cschneid has joined #ruby
Dbugger has quit [Quit: Leaving]
doodlebug has quit [Ping timeout: 276 seconds]
fphilipe has joined #ruby
Swyper has joined #ruby
agent_white has quit [Quit: brb]
dsmythe_ has joined #ruby
blackmesa has joined #ruby
dsmythe has quit [Ping timeout: 264 seconds]
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
jelera has joined #ruby
jelera has quit [Client Quit]
agent_white has joined #ruby
houhoulis has joined #ruby
dpapp has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
dpapp has left #ruby [#ruby]
houhoulis has quit [Remote host closed the connection]
Tempesta_ has quit [Quit: AdiIRC is updating to v3.4 Beta Build (2019/04/27 UTC) 64 Bit]
Tempesta has joined #ruby
jefffrails35 has joined #ruby
prestorium has quit [Ping timeout: 276 seconds]
lord4163 has quit [Quit: Gotta go cya!]
krawchyk has quit [Quit: krawchyk]
krawchyk has joined #ruby
llua has joined #ruby
ngw has quit [Ping timeout: 258 seconds]
Swyper has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 276 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ech0s7 has quit [Ping timeout: 256 seconds]
duderonomy has joined #ruby
dsmythe_ has quit [Read error: Connection reset by peer]
dsmythe has joined #ruby
Swyper has joined #ruby
fphilipe has joined #ruby
hightower2 has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
krawchyk has quit [Quit: krawchyk]
fphilipe has joined #ruby
krawchyk has joined #ruby
tdy1 has quit [Ping timeout: 258 seconds]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has quit [Ping timeout: 264 seconds]
<Swyper> hi
<Swyper> rspec ./spec/0_hangman_spec.rb:116 # Hangman PART 1 #get_matching_indices should return an array containing all indices of @secret_word where the char can be found
<Swyper> any good methods for arrays which return all indices matching a certain pattern?
<Swyper> I see find_index, and I know I can just iterate through the elements of the array to solve this - just wondering if there a simpler ruby way to implement this
<phaul> &>> [1,2,3,5,7].each_with_index.select { |ix, e| e.odd? }
<rubydoc> # => [[2, 1], [5, 3]] (https://carc.in/#/r/6t2t)
<phaul> wot?
lxsameer has quit [Ping timeout: 245 seconds]
<phaul> hm. obviously ^ doesn't work then
<Swyper> I could do each_with_index and store the indexes where there is a match in a new array
<phaul> ah, it's backwards. each_with_index puts the index to the second elem
<phaul> &>> [1,2,3,5,7].each_with_index.select { |e, ix| e.odd? }
<rubydoc> # => [[1, 0], [3, 2], [5, 3], [7, 4]] (https://carc.in/#/r/6t2u)
<phaul> so you can include the indices, you still get an Enumerator, which is Enumerable, so everything in the Enumerable interface is available select, sort etc
ramfjord has joined #ruby
<phaul> it's common to daisy chain Enumerators like that.
jmcgnh has joined #ruby
<phaul> you could map down to indices only by chaining a map(&:last) on it.
krawchyk has quit [Quit: krawchyk]
<phaul> &>> [1,2,3,5,7].each_with_index.select { |e, ix| e.odd? }.map(&:last)
<rubydoc> # => [0, 2, 3, 4] (https://carc.in/#/r/6t2v)
krawchyk has joined #ruby
nowhereman has quit [Ping timeout: 250 seconds]
akem has joined #ruby
jmcgnh has quit [Ping timeout: 245 seconds]
akem__ has quit [Ping timeout: 246 seconds]
fphilipe has joined #ruby
cthulchu_ has joined #ruby
<Swyper> not sure why its not working
<Swyper> expected: [1, 2]
<Swyper> got: []
cthulchu has quit [Ping timeout: 245 seconds]
pupsikov has joined #ruby
hightower3 has joined #ruby
<phaul> &>> 'hangman'.split
<rubydoc> # => ["hangman"] (https://carc.in/#/r/6t2y)
<phaul> &>> 'hangman'.chars
<rubydoc> # => ["h", "a", "n", "g", "m", "a", "n"] (https://carc.in/#/r/6t2z)
<phaul> or also
sauvin has quit [Read error: Connection reset by peer]
<phaul> &>> 'hangman'.split('')
<rubydoc> # => ["h", "a", "n", "g", "m", "a", "n"] (https://carc.in/#/r/6t31)
<Swyper> ah
hightower2 has quit [Ping timeout: 255 seconds]
sameerynho has joined #ruby
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
jmcgnh has joined #ruby
planigan has quit [Ping timeout: 268 seconds]
planigan has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
Swyper has quit [Remote host closed the connection]
suukim has quit [Quit: Konversation terminated!]
jrafanie has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
ramfjord_ has joined #ruby
krawchyk has quit [Quit: krawchyk]
ramfjord has quit [Ping timeout: 244 seconds]
nowhereman has joined #ruby
fphilipe has joined #ruby
ngw has joined #ruby
ngw has quit [Ping timeout: 258 seconds]
krawchyk has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
cd has quit [Quit: cd]
kyrylo has joined #ruby
PepeLePewPew has left #ruby [#ruby]
hightower3 has quit [Changing host]
hightower3 has joined #ruby
mochiyoda_ has joined #ruby
mochiyoda has quit [Ping timeout: 276 seconds]
vondruch_ has joined #ruby
blackmesa has quit [Quit: WeeChat 2.4]
vondruch has quit [Ping timeout: 246 seconds]
vondruch_ is now known as vondruch
violentE has quit [Read error: Connection reset by peer]
violentE has joined #ruby
ramfjord_ has quit [Ping timeout: 268 seconds]
conta has quit [Quit: conta]
houhoulis has joined #ruby
ramfjord has joined #ruby
ua_ has quit [Ping timeout: 250 seconds]
ngw has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
tdy1 has joined #ruby
ngw has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
jottr has joined #ruby
yo_ has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
ua has joined #ruby
ngw has joined #ruby
eckhardt has joined #ruby
Eiam has joined #ruby
jenrzzz has joined #ruby
ngw has quit [Ping timeout: 268 seconds]
yo_ has quit [Quit: Page closed]
yoyo has joined #ruby
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
haivron has quit [Quit: haivron]
doodlebug has joined #ruby
waheedi has quit [Quit: waheedi]
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
lord4163 has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
ngw has joined #ruby
yoyo has quit []
nowhereman has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
jefffrails35 has quit [Remote host closed the connection]
Dbugger has joined #ruby
al2o3-cr has joined #ruby
ngw has quit [Ping timeout: 245 seconds]
waheedi has joined #ruby
Yxhuvud has quit [Ping timeout: 264 seconds]
Yxhuvud has joined #ruby
cthu| has joined #ruby
Dbugger has quit [Quit: Leaving]
cthulchu_ has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
cd has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
waheedi has quit [Quit: waheedi]
Fernando-Basso has joined #ruby
ngw has joined #ruby
lupine has quit [Ping timeout: 250 seconds]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
pupsikov has joined #ruby
ngw has quit [Ping timeout: 244 seconds]
lupine has joined #ruby
ldnunes has quit [Quit: Leaving]
jelera has joined #ruby
reber has quit [Remote host closed the connection]
jottr has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
lupine has quit [Remote host closed the connection]
elcontrastador has joined #ruby
lupine has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
ngw has joined #ruby
ngw has quit [Ping timeout: 255 seconds]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ngw has joined #ruby
ngw has quit [Ping timeout: 250 seconds]
teardown has quit [Ping timeout: 255 seconds]
sp01nk has joined #ruby
sp01nk has quit [Client Quit]
krawchyk has quit [Quit: krawchyk]
jcarl43 has quit [Quit: WeeChat 2.4]
ngw has joined #ruby
queip has quit [Ping timeout: 246 seconds]
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
ngw has quit [Ping timeout: 250 seconds]
tdy1 has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 246 seconds]
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower3 has quit [Ping timeout: 250 seconds]
ngw has joined #ruby
queip has joined #ruby
ngw has quit [Ping timeout: 255 seconds]
wald0 is now known as james382
jelera has joined #ruby
polishdub has quit [Quit: leaving]
gix- has joined #ruby
gix has quit [Disconnected by services]
tdy1 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ngw has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
tdy1 has quit [Ping timeout: 258 seconds]
ngw has quit [Ping timeout: 246 seconds]
galaxie has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
comet23 has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<comet23> is lexical scope and local scope the same thing?
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
<phaul> hm. that can of worm. I opened it in the past and got all my pinkies burnt
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
<phaul> it's more like " there is many different scopes" and it all depends on the context
<comet23> darn
eckhardt has joined #ruby
<comet23> i thought i had it figured out
eckhardt has quit [Client Quit]
<comet23> or at least understood what the text was talking about
jelera has joined #ruby
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
<phaul> probably it was correct, but maybe incomplete. there is scope for constant lookup. there is scope for variablbe lookup, there is the current self, etc
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
ngw has joined #ruby
doodlebug has quit [Ping timeout: 276 seconds]
<comet23> i was just trying to understand lexical scope
doodleb45 has joined #ruby
ngw has quit [Ping timeout: 246 seconds]
<phaul> yeah,. the main thing is to ask, what you are trying to look up. then that defines the scope for it
dsmythe_ has joined #ruby
dsmythe has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
<phaul> I did this thing it might be or might not be useful, but here it is https://github.com/phaul/ruby_101/blob/master/content/book.md#constant-visibility-and-lexical-scopes
fphilipe has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has quit [Ping timeout: 250 seconds]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
ngw has joined #ruby
ngw has quit [Ping timeout: 245 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3_ has joined #ruby
clemens3 has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
krawchyk has joined #ruby
krawchyk has quit [Client Quit]
Fernando-Basso has quit [Remote host closed the connection]
CableNinja has joined #ruby
<CableNinja> hey guys, I was in here askin last night, but didnt get a response. trying to do an SSL server/client setup (straight tcp/ssl via TCP/SSL network sockets). I'm struggling to get a complete connection. using openssl_sclient I get correct info, but when I connect using the ruby client I get "unexpected message" on the client side, and "wrong version number" on the server side. Both are running on same system, running same ssl version
<CableNinja> (1.1.1b)
ngw has joined #ruby
<comet23> phaul did you write that page?
sylario has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 246 seconds]
ngw has quit [Ping timeout: 250 seconds]
<phaul> many many years ago in a galaxy far far away...