In0perable has quit [Quit: All your buffer are belong to us!]
lapsa_ has quit [Quit: leaving]
ignorand has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
ignorand has joined #ruby
mtsd has quit [Quit: Leaving]
charrit69 has joined #ruby
<ignorand>
phonenumber='8703443'\n regex = Regexp.new('(71|72|74|76|81|82|84|85|86|87|88|89)\d{5}').freeze\n phonenumber =~ regex\n (Why does this give 0 instead of true?)
<jhass>
because Regex#=~ returns the position of the match or nil if there was none
fippy has quit [Read error: Connection reset by peer]
fippy has joined #ruby
fluxAeon_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
jobewan has quit [Quit: jobewan]
Mia has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 260 seconds]
DaRock has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
bmurt has joined #ruby
baojg_ has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
Glumetu has quit [Quit: Glumetu]
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
braincrash has quit [Ping timeout: 240 seconds]
ujjain has quit [Ping timeout: 256 seconds]
ChmEarl has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
<nakilon>
weird, node.at_css("a") does not find the node <a> if it's the node itself
helpa has joined #ruby
Giorgio has quit [Quit: Leaving]
<ignorand>
I have an array of arrays. I want to do a select where column 3 matches sometihng and column 4 matches something. Is json_data["data"].select{|x| x[3][/^5978718789$/] && x[2][/^10$/]} the most natural way to write it?
<adam12>
ignorand: I'd probably use equality and not a regexp.
<adam12>
ignorand: If the columns have any significance, you could extract them in the block arguments. .select { |_, foo, bar, _rest| }
<adam12>
|_, _, foo, bar, _rest| rather
cthulchu_ has joined #ruby
<ignorand>
@adam12 that solves my next question
<ignorand>
I had to replace 5978718789 with a var
TomyWork has quit [Remote host closed the connection]
ellcs has joined #ruby
<nakilon>
|_, _, foo, bar, |
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua has quit [Ping timeout: 240 seconds]
<nakilon>
but if you mean you want to find matching rows and edit values in them in place then you rather might want to do .each{ |x| x[3] = var if ... }
<nakilon>
here x points to the row that you can edit, otherwise you'll not have a row reference; but if x[3] is a string and you want to replace it with another string then |_, _, foo, bar, | will work fine if you do the foo.replace(var) if ...
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has quit [Ping timeout: 256 seconds]
cloud69 has quit [Quit: Connection closed for inactivity]
cow[moo] has joined #ruby
dan64 has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
braincrash has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
andremedeiros has quit [Quit: ZNC 1.8.2 - https://znc.in]
shokohsc has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
<ignorand>
no clue what |_, _, foo, bar, | means, but I solved it for now
<ignorand>
Thanks
Emmanuel_Chanel has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
al2o3-cr has quit [Quit: WeeChat 2.9]
mtsd has joined #ruby
al2o3-cr has joined #ruby
mtsd has quit [Quit: Leaving]
weaksauce has joined #ruby
dfucci has joined #ruby
bmurt has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
cd has joined #ruby
howdoi has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bocaneri has quit [Read error: Connection reset by peer]
Rudd0 has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
davispuh has quit [Ping timeout: 246 seconds]
qqqqqq has joined #ruby
<qqqqqq>
Lets praise Allah; he is our God, thee one; he is the god of Moses; Noah; Jesus & Mohammed; he sent us our Book Quran, Monotheism is cleared by all prophets ~ We get heaven & happiness on earth by praying to the one god & by Saying No God except Allah & that Mohammed is the messenger of Allah. treat others as u like to be treated ---------;{@
qqqqqq has left #ruby [#ruby]
fippy has quit [Ping timeout: 260 seconds]
davispuh has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bmurt has joined #ruby
impermanence has quit [Quit: Connection closed]
impermanence has joined #ruby
bamdad has quit [Remote host closed the connection]
ignorand has quit [Remote host closed the connection]
bamdad has joined #ruby
SeepingN has joined #ruby
powerhouse has quit [Quit: Leaving]
powerhouse has joined #ruby
braincrash has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
s2013 has joined #ruby
orbyt_ has joined #ruby
Inoperable has joined #ruby
desnudopenguino has joined #ruby
<apotheon>
I wonder whether people think that popping up in a channel, quoting some kind of religious dogma, and disappearing again will ever have a convincing advocacy effect on the reader.
<apotheon>
It seems like a ridiculously good way to make enemies rather than friends.
<desnudopenguino>
they just trollin
Glumetu has joined #ruby
braincrash has joined #ruby
<Glumetu>
hello is anyone familiar with nokogiri syntax for xml ? i need to knwo how to add an atribute like symb in this line <Country symb="US">00,00%</Country>