havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
linoge has joined #ruby
silviu3 has joined #ruby
silviu has quit [Read error: Connection reset by peer]
linoge has quit [Ping timeout: 240 seconds]
rzjian has joined #ruby
queip has joined #ruby
tvl has quit [Ping timeout: 240 seconds]
tvl has joined #ruby
orbyt_ has joined #ruby
rzjian has quit [Ping timeout: 276 seconds]
rzjian has joined #ruby
akmed has quit [Ping timeout: 265 seconds]
teardown_ has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
cuerbot has quit [Read error: Connection reset by peer]
teardown_ has quit [Remote host closed the connection]
elcuervo has joined #ruby
teardown has joined #ruby
teardown has quit [Remote host closed the connection]
teardown has joined #ruby
linoge has joined #ruby
mozzarella has quit [Read error: Connection reset by peer]
linoge has quit [Ping timeout: 276 seconds]
Rounin has quit [Ping timeout: 272 seconds]
teardown_ has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
teardown has quit [Ping timeout: 268 seconds]
akem has joined #ruby
akem_ has quit [Ping timeout: 264 seconds]
teardown has joined #ruby
rzjian has quit [Quit: WeeChat 3.0]
teardown_ has quit [Ping timeout: 268 seconds]
noctux has quit [Read error: Connection reset by peer]
noctux has joined #ruby
teardown_ has joined #ruby
endorama_ has quit [Remote host closed the connection]
endorama has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
akem_ has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
akem has quit [Ping timeout: 246 seconds]
jcsmit17 has quit [Quit: Ping timeout (120 seconds)]
jenrzzz_ has quit [Ping timeout: 258 seconds]
teardown_ has joined #ruby
jenrzzz has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
baojg has joined #ruby
silviu3 has quit [Remote host closed the connection]
silviu has joined #ruby
rzjian has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
teardown_ has joined #ruby
akem has joined #ruby
akem_ has quit [Ping timeout: 264 seconds]
teardown has quit [Ping timeout: 268 seconds]
mozzarella has joined #ruby
linoge has joined #ruby
linoge has quit [Ping timeout: 276 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
teardown has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
teardown_ has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
teardown_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
teardown_ has joined #ruby
linoge has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
linoge has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
teardown_ has joined #ruby
dfucci has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
rzjian has quit [Quit: WeeChat 3.0]
teardown_ has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
ChmEarl has quit [Quit: Leaving]
teardown_ has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teardown_ has quit [Ping timeout: 268 seconds]
cliluw has quit [Ping timeout: 258 seconds]
linoge has joined #ruby
cliluw has joined #ruby
Milos has quit [Read error: Connection reset by peer]
Milos has joined #ruby
teardown_ has joined #ruby
linoge has quit [Ping timeout: 240 seconds]
Milos has quit [Read error: Connection reset by peer]
Milos has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
linoge has joined #ruby
teardown has joined #ruby
cd has quit [Quit: cd]
teardown_ has quit [Ping timeout: 268 seconds]
teardown_ has joined #ruby
linoge has quit [Ping timeout: 276 seconds]
teardown has quit [Ping timeout: 268 seconds]
dfucci has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
teardown has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
teardown has quit [Remote host closed the connection]
teardown_ has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
teardown_ has joined #ruby
jenrzzz has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
linoge has joined #ruby
teardown has joined #ruby
linoge has quit [Ping timeout: 276 seconds]
teardown_ has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ruby
mr_rich101 has joined #ruby
m27frogy has quit [Ping timeout: 240 seconds]
teardown_ has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
duderonomy has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
dfucci has quit [Ping timeout: 240 seconds]
teardown_ has joined #ruby
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
teardown_ has quit [Ping timeout: 268 seconds]
teardown has quit [Ping timeout: 268 seconds]
akem_ has joined #ruby
akem has quit [Ping timeout: 246 seconds]
jla has joined #ruby
rzjian has joined #ruby
linoge has joined #ruby
linoge has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
linoge has joined #ruby
linoge has quit [Ping timeout: 246 seconds]
akem_ has quit [Ping timeout: 240 seconds]
akem has joined #ruby
nofxx_ has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 246 seconds]
nofxx__ has quit [Ping timeout: 240 seconds]
neshpion has quit [Quit: neshpion]
dfucci has joined #ruby
gix- has quit [Ping timeout: 240 seconds]
Tempesta_ has left #ruby ["Closing Channel, bye."]
Tempesta has joined #ruby
ChewyB has joined #ruby
ChewyB is now known as akemb
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
ChewiB has joined #ruby
akemb has quit [Remote host closed the connection]
sinan has joined #ruby
ChewiiB has joined #ruby
ChewiB has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jla has quit [Ping timeout: 258 seconds]
Rudd0 has quit [Ping timeout: 240 seconds]
tsujp1 has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
schaerli has joined #ruby
sinan has quit [Quit: sinan]
sinan has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
teclator has quit [Ping timeout: 272 seconds]
schaerli has quit [Ping timeout: 264 seconds]
linoge has joined #ruby
linoge has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
gray_-_wolf has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
gray_-_wolf has joined #ruby
jenrzzz has joined #ruby
TomyWork has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
prestorium has quit [Quit: prestorium]
sinan has quit [Ping timeout: 240 seconds]
Rounin has joined #ruby
alexherbo2 has joined #ruby
hiroaki has quit [Ping timeout: 264 seconds]
linoge has joined #ruby
<alexherbo2> yo o/
linoge has quit [Ping timeout: 276 seconds]
schne1der has joined #ruby
yxhuvud has quit [Ping timeout: 268 seconds]
yxhuvud has joined #ruby
jla has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
joast has quit [Ping timeout: 240 seconds]
Mia has joined #ruby
mr_rich101 has quit [Quit: ZNC - http://znc.in]
mr_rich101 has joined #ruby
Axy has quit [Ping timeout: 264 seconds]
GankMove has quit [Read error: Connection reset by peer]
vondruch__ has joined #ruby
Axy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
linoge has joined #ruby
Mia has joined #ruby
Axy has quit [Read error: Connection reset by peer]
Rudd0 has joined #ruby
rzjian has quit [Quit: WeeChat 3.0]
linoge has quit [Ping timeout: 240 seconds]
cnsvc has quit [Ping timeout: 268 seconds]
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg_ has joined #ruby
baojg__ has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
baojg_ has quit [Ping timeout: 264 seconds]
linoge has joined #ruby
linoge has quit [Ping timeout: 265 seconds]
ChewyB has joined #ruby
ChewiiB has quit [Ping timeout: 240 seconds]
baojg__ has quit [Remote host closed the connection]
akem_ has joined #ruby
akem has quit [Ping timeout: 240 seconds]
shokohsc has quit [Quit: The Lounge - https://thelounge.chat]
shokohsc has joined #ruby
somazero has joined #ruby
al2o3-cr has joined #ruby
gearnode has joined #ruby
<NL3limin4t0r> isene: If you are working with Rails you could also use #in? ( https://api.rubyonrails.org/classes/Object.html#method-i-in-3F )
<NL3limin4t0r> eg: chr.in?(%w[ENTER + - * /])
ChewyB has quit [Read error: Connection reset by peer]
TomyLobo has joined #ruby
ChewyB has joined #ruby
TomyWork has quit [Remote host closed the connection]
ChewyB has quit [Read error: Connection reset by peer]
TomyWork has joined #ruby
linoge has joined #ruby
ChewyB has joined #ruby
linoge has quit [Ping timeout: 276 seconds]
<isene> Never touched Rails (I write mostly applications for the terminal/cli)
m27frogy has joined #ruby
ChewyB has quit [Remote host closed the connection]
ChewyB has joined #ruby
linoge has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
ChewyB has quit [Read error: Connection reset by peer]
jinie_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
ChewyB has joined #ruby
ChewyB has quit [Read error: Connection reset by peer]
ChewyB has joined #ruby
jla has quit [Ping timeout: 276 seconds]
<nakilon> isene, yo dawg, I heard you love pithon? so we added the method #in to String class so you could write in pithon while writing in ruby; here take ActiveSupport with 3498539847 other core extensions, good luck
jinie has joined #ruby
somazero has quit [Remote host closed the connection]
<alexherbo2> is there an opposite to rspec shared example?
<alexherbo2> I have a test for `.find` with a context `when not found` where I have a shared example `a Pokemon`, I would like something like: `it_behave_not_like 'a Pokemon'`
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
cliluw has quit [Ping timeout: 258 seconds]
linoge has quit [Read error: No route to host]
linoge has joined #ruby
stryek has joined #ruby
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 276 seconds]
alexherbo2 has quit [Ping timeout: 265 seconds]
jla has joined #ruby
alexherbo2 has joined #ruby
User458764 has quit [Ping timeout: 260 seconds]
User4587_ has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
einyoul_ has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
einyoul has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
ChewyB has quit [Read error: Connection reset by peer]
joast has joined #ruby
ChewyB has joined #ruby
ChewyB has quit [Read error: Connection reset by peer]
jla has quit [Quit: Leaving.]
jla has joined #ruby
ChewyB has joined #ruby
duderonomy has joined #ruby
sinan has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
akem_ has quit [Read error: Connection reset by peer]
<phaul> alexherbo2: my bet is the answer is no. You can negate things at the matcher level, but shared examples are more like describing some complex behaviour. I'm not sure what the opposite of that means or why that woould be useful. Ie if you think about it, Array, String BasicObject all don't behave like a Pokemon
gdc_m has joined #ruby
<phaul> maybe it's an xy problem where describing what the goal is would be better than proposing a solution
<phaul> &fact xy
<rubydoc> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
einyoul has quit [Ping timeout: 264 seconds]
ChmEarl has joined #ruby
GodFather has joined #ruby
noctux has quit [Ping timeout: 240 seconds]
noctux has joined #ruby
jla has quit [Ping timeout: 240 seconds]
jla has joined #ruby
einyoul has joined #ruby
brainfunnel has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
FetidToot has joined #ruby
hiroaki has joined #ruby
<NL3limin4t0r> alexherbo2: You can write your own matchers though. You could write the matcher `behaves_like_a` and you are able to do something like `expect(subject).to behave_like_a(:pokemon)` and `expect(subject).to_not behave_like_a(:pokemon)`
<NL3limin4t0r> See https://rspec.info/documentation/3.9/rspec-expectations/RSpec/Matchers.html for custom matcher documentation.
jenrzzz has joined #ruby
<NL3limin4t0r> ^ `to_not` should be `not_to`
<apotheon> Yeah, `#to_not behave_like` is much better than something like `#does_not_behave_like` or `#to not_behave_like`.
<apotheon> to_not should work just fine, last I checked
<apotheon> It's also more grammatically precise than not_to.
<NL3limin4t0r> Yeah, that's why I choose it in the first place, but I was second guessing myself because the documentation uses `not_to` and I was not sure if it is aliased. But I guess it is.
<apotheon> I had a boss once who wondered why I kept using to_not instead of not_to.
<apotheon> I explained it, and he still didn't seem to understand.
<apotheon> "because English"
<apotheon> That's the short version, but not the version I gave the boss.
sinan has quit [Quit: sinan]
<NL3limin4t0r> The more gramatically correct one is often the better choice, but the alias is nice because depending on the context #to_not might not always be the best option.
<leftylink> hmm, will need to think about it for a bit, non native speaker...
<leftylink> I guess to not seems to make more sense to me. I expect you to not insult your coworkers vs I expect you not to insult your coworkers
jenrzzz has quit [Ping timeout: 265 seconds]
neshpion has joined #ruby
ChewyB has quit [Remote host closed the connection]
ChewyB has joined #ruby
gdc_m has quit [Quit: gdc_m]
kristian_on_linu has joined #ruby
jla has quit [Ping timeout: 276 seconds]
<apotheon> leftylink: If you say "to not", you're saying exactly one thing: that your expectation is that something will not happen.
<apotheon> leftylink: If you say "not to", you're saying you don't *expect* it to happen, but it's allowable for it to happen.
<apotheon> leftylink: (expect) (to not) happen; (expect not) (to) happen
cthulchu_ has joined #ruby
<apotheon> You can think of it as "not" binding to the preceding term.
ChewiB has joined #ruby
<apotheon> Most native English speakers don't think about stuff enough to notice this.
kristian_on_linu has quit [Remote host closed the connection]
<apotheon> That binding statement doesn't really clarify the grammatical rules, but I think it kinda works as shorthand thinking about it.
<apotheon> hmm
<phaul> one should not confuse the purpose of matchers with shared examples though. Yes you can negate matchers, but matchers and shared examples are on different level of abstraction... That's why I was saying maybe a disscussion on what we are trying to achieve here first could be useful
<apotheon> Okay, a better explanation:
ChewyB has quit [Ping timeout: 256 seconds]
<apotheon> The application of "not" is ambiguous, actually. It can apply either to the term before or after it, though applying to the term before it is more awkward. In the case of "expect not to", which of "expect" and "to" is affected makes the clause meaning ambiguous, but "to not match" is unambiguous because the negation of either "to" or "match" has the same overall semantic effect.
FastJack has quit [Ping timeout: 265 seconds]
<apotheon> . . . and there are, of course, instances of Skitt's Law in my explanation.
<apotheon> (e.g. placement of "either" in that sentence is grammatically less than ideal)
FetidToot has quit [Quit: FetidToot]
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
FastJack has joined #ruby
schne1der has quit [Ping timeout: 256 seconds]
vondruch__ has quit [Read error: Connection reset by peer]
dhollinger has quit [Ping timeout: 272 seconds]
vondruch__ has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
sgen_ has joined #ruby
orbyt_ has joined #ruby
jenrzzz has joined #ruby
jla has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
mic_e_ has joined #ruby
TomyWork has quit [Remote host closed the connection]
mic_e_ has quit [Ping timeout: 258 seconds]
dhollinger has joined #ruby
gix has joined #ruby
kristian_on_linu has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc has joined #ruby
ritsch_master has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
cb- has quit [Ping timeout: 240 seconds]
jla has quit [Ping timeout: 258 seconds]
nofxx__ has joined #ruby
sgen__ has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
sgen_ has quit [Ping timeout: 276 seconds]
nofxx_ has quit [Ping timeout: 276 seconds]
akem has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
dnadev2 has joined #ruby
postmodern has quit [Quit: Leaving]
<dnadev2> hi, looking for a decent way to grab a part of a string. str = "This part will be variable. AdvertisingID: Source 123456, More Stuff variable in length." In this example i need the "Source 123456" - it will always be after the "AdvertisingID:" and will always end with ",".
<ritsch_master> dnadev2: well sounds like you need a regex
<ritsch_master> actually you will need 2
<ritsch_master> first one checking if the string matches your pattern
<ritsch_master> the second one to retrieve "Source ..."
<phaul> &>> "This part will be variable. AdvertisingID: Source 123456, More Stuff variable in length."[/(?<=AdvertisingID: ).*(?=,)/]
<rubydoc> # => "Source 123456" (https://carc.in/#/r/acuy)
<phaul> positive lookahead / lookbehind can be useful for this
<adam12> Oh that's a nice one phaul.
<adam12> The lookahead for the comma is a nice touch.
<dnadev2> phaul, works great! checking out adam12's now :)
<dnadev2> thanks guys, appreciate it. i was trying with .match but couldn't get it working right. this is great. nice tool too - rubular, bookmarked.
Mrgoose has joined #ruby
jenrzzz has joined #ruby
alexherbo2 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
plutes has joined #ruby
dnadev2 has quit [Quit: Leaving]
plutes has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
tsrt^ has joined #ruby
ritsch_master has quit [Remote host closed the connection]
fercell has quit [Ping timeout: 265 seconds]
fercell has joined #ruby
fercell has quit [Quit: WeeChat 3.0]
jenrzzz has quit [Ping timeout: 256 seconds]
schne1der has joined #ruby
kevinburke has joined #ruby
cd has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
linoge has quit [Remote host closed the connection]
dfucci has joined #ruby
noctux has quit [Read error: Connection reset by peer]
newton has joined #ruby
m27frogy has quit [Ping timeout: 240 seconds]
mehwork has joined #ruby
gdc_m has joined #ruby
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
fercell has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
noctux has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
zapata has quit [Quit: WeeChat 3.0]
zapata has joined #ruby
m27frogy has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rounin has quit [Ping timeout: 258 seconds]
schne1der has quit [Ping timeout: 272 seconds]
m27frogy has quit [Ping timeout: 276 seconds]
orbyt_ has joined #ruby
prepend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
m27frogy has joined #ruby
gdc_m has quit [Quit: gdc_m]
va5c0 has joined #ruby
pabs has joined #ruby
somazero has joined #ruby
mbrndtgn has quit [Quit: The Lounge - https://thelounge.chat]
neshpion has quit [Quit: neshpion]
mbrndtgn has joined #ruby
somazero has quit [Client Quit]
gearnode has quit [Ping timeout: 258 seconds]
gearnode has joined #ruby
va5c0 has quit [Ping timeout: 240 seconds]
cognemo has quit [Quit: cognemo]
cognemo has joined #ruby
sgen__ has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
Rudd0 has quit [Ping timeout: 256 seconds]
neshpion has joined #ruby