havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.4, 2.5.6, 2.7.0-preview1: 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!
ap4y has quit [Ping timeout: 276 seconds]
x86sk has joined #ruby
Freshnuts has joined #ruby
DaRock has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Quit: AJA4350]
roaet has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roaet has quit [Ping timeout: 276 seconds]
parity has quit [Ping timeout: 240 seconds]
grilix has joined #ruby
jenrzzz has joined #ruby
peter_ has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
poontangmessiah has quit [Remote host closed the connection]
cesario has joined #ruby
oetjenj has joined #ruby
Swyper has joined #ruby
tsujp has joined #ruby
Swyper has quit [Remote host closed the connection]
tpanarch1st_ has quit [Ping timeout: 258 seconds]
dviola has quit [Quit: WeeChat 2.6]
Swyper has joined #ruby
brool has quit [Ping timeout: 245 seconds]
gix has quit [Ping timeout: 245 seconds]
greypack has quit [Ping timeout: 268 seconds]
wald0 has quit [Quit: Lost terminal]
greypack has joined #ruby
pawptart has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
cesario has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
cnsvc has joined #ruby
Esa_ has quit []
cesario has joined #ruby
cesario has quit [Read error: Connection reset by peer]
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
Intelo has quit [Max SendQ exceeded]
Intelo has joined #ruby
Intelo has quit [Max SendQ exceeded]
catphish has quit [Quit: Leaving]
Intelo has joined #ruby
borori has joined #ruby
agent_white has quit [Quit: untiltomorrow]
borori has left #ruby ["WeeChat 2.6"]
banisterfiend has joined #ruby
Pip has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
claw has quit [Ping timeout: 276 seconds]
ravenousmoose has joined #ruby
claw has joined #ruby
donofrio has quit [Remote host closed the connection]
claw has quit [Ping timeout: 246 seconds]
ravenousmoose has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
alfiemax has joined #ruby
claw has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 245 seconds]
roaet has joined #ruby
roaet has quit [Ping timeout: 276 seconds]
dviola has joined #ruby
dostoyevsky has quit [Quit: leaving]
ur5us has quit [Remote host closed the connection]
dostoyevsky has joined #ruby
cd has quit [Quit: cd]
grilix has quit [Ping timeout: 268 seconds]
dbugger has joined #ruby
howdoi has joined #ruby
schaerli has joined #ruby
Freshnuts has quit [Remote host closed the connection]
Freshnuts has joined #ruby
Inline has quit [Quit: Leaving]
schne1der has joined #ruby
fphilipe has joined #ruby
schaerli has quit [Ping timeout: 240 seconds]
willardg has joined #ruby
willardg has quit [Client Quit]
dviola has quit [Quit: WeeChat 2.6]
x86sk has quit [Quit: Connection closed for inactivity]
pawptart has quit [Ping timeout: 276 seconds]
suukim has joined #ruby
absolutejam1 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
schne1der has quit [Ping timeout: 268 seconds]
fphilipe has quit [Ping timeout: 245 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
FrankDW has quit [Read error: Connection reset by peer]
FrankDW has joined #ruby
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby
alfiemax has quit [Remote host closed the connection]
manakanapa has quit [Ping timeout: 245 seconds]
alfiemax has joined #ruby
lnx has quit [Ping timeout: 240 seconds]
b0nn has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby
b0nn has joined #ruby
lnx has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
fphilipe has joined #ruby
oetjenj has quit [Client Quit]
Intelo has quit [Remote host closed the connection]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
fphilipe has quit [Ping timeout: 245 seconds]
absolutejam1 has quit [Ping timeout: 265 seconds]
emptyflask has quit [Ping timeout: 276 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
queip_ has joined #ruby
vondruch has quit [Quit: vondruch]
queip has quit [Ping timeout: 276 seconds]
queip_ is now known as queip
alfiemax has quit [Ping timeout: 265 seconds]
dpl has joined #ruby
ua has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
dpl_ has joined #ruby
absolutejam1 has joined #ruby
schne1der has joined #ruby
bitwinery has quit [Quit: Leaving]
alfiemax has joined #ruby
dpl has quit [Ping timeout: 276 seconds]
dpl_ has quit [Ping timeout: 245 seconds]
dpl has joined #ruby
mtuckerbradford has joined #ruby
SuperL4g is now known as SuperLag
rafadc has quit [Read error: Connection reset by peer]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
rafadc has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
vondruch has joined #ruby
haxx0r has joined #ruby
ravenousmoose has joined #ruby
lxsameer has joined #ruby
ua has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
queip has quit [Ping timeout: 265 seconds]
guardian has quit [Remote host closed the connection]
queip has joined #ruby
blackmesa has quit [Quit: WeeChat 2.6]
blackmesa has joined #ruby
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
queip has quit [Ping timeout: 268 seconds]
TomyWork has joined #ruby
absolutejam1 has quit [Ping timeout: 276 seconds]
absolutejam1 has joined #ruby
queip has joined #ruby
hightower2 has quit [Ping timeout: 265 seconds]
dpl has quit [Ping timeout: 265 seconds]
Freshnuts has quit [Quit: Leaving]
Huck777 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Ping timeout: 276 seconds]
dpl has joined #ruby
chalkmonster has joined #ruby
thexa4 has joined #ruby
jmcgnh has quit [Ping timeout: 240 seconds]
throsturx has joined #ruby
jmcgnh has joined #ruby
Eiam has quit [Ping timeout: 264 seconds]
deathwishdave has joined #ruby
hightower2 has joined #ruby
absolutejam1 has quit [Ping timeout: 240 seconds]
involans has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
absolutejam1 has joined #ruby
blackmesa has joined #ruby
throsturx is now known as throstur
haxx0r has quit [Remote host closed the connection]
roaet has joined #ruby
roaet has quit [Ping timeout: 258 seconds]
_Joes_ has joined #ruby
hutch1 has quit [Ping timeout: 276 seconds]
chichou has joined #ruby
absolutejam1 has quit [Ping timeout: 245 seconds]
dpl has quit [Read error: Connection reset by peer]
NL3limin4t0r_afk is now known as NL3limin4t0r
dasher00 has joined #ruby
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
dionysus69 has quit [Ping timeout: 245 seconds]
dpl has joined #ruby
NL3limin4t0r has joined #ruby
queip has quit [Ping timeout: 246 seconds]
queip has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
chalkmonster has joined #ruby
_Joes_ has quit [Remote host closed the connection]
absolutejam1 has joined #ruby
Pip has quit [Quit: Leaving]
ryouba has quit [Quit: WeeChat 2.3]
BH23 has joined #ruby
_Joes_ has joined #ruby
_Joes_ has quit [Client Quit]
mtuckerbradford is now known as funburn
schaerli has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
ryouba has joined #ruby
ellcs has joined #ruby
greypack has quit [Ping timeout: 276 seconds]
FernandoBasso has joined #ruby
absolutejam1 has quit [Ping timeout: 268 seconds]
Swyper has joined #ruby
dionysus69 has joined #ruby
absolutejam1 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
ellcs1 has joined #ruby
Swyper has joined #ruby
Azure has quit [Read error: Connection reset by peer]
ellcs1 has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
alem0lars has joined #ruby
Swyper has joined #ruby
agent_white has joined #ruby
ellcs1 has joined #ruby
alem0lars has quit [Ping timeout: 240 seconds]
FernandoBasso has quit [Remote host closed the connection]
chichou has quit [Quit: WeeChat 2.6]
involans has quit [Quit: involans]
ellcs1 has quit [Ping timeout: 258 seconds]
cyclonis has joined #ruby
involans has joined #ruby
AJA4350 has joined #ruby
funburn has left #ruby [#ruby]
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
dpl has quit [Remote host closed the connection]
chalkmonster has quit [Quit: WeeChat 2.6]
dpl has joined #ruby
GodFather has joined #ruby
thexa4 has quit [Quit: My computer has gone to sleep. ZZZzzz…]
absolutejam1 has quit [Ping timeout: 245 seconds]
hutch1 has joined #ruby
absolutejam1 has joined #ruby
Azure has joined #ruby
hutch1 has quit [Ping timeout: 250 seconds]
nowhereman has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
guardian has joined #ruby
banisterfiend has joined #ruby
jcalla has quit [Ping timeout: 265 seconds]
<dionysus69> how would I insert underscore before an integer in a string
<dionysus69> using regex
<dionysus69> "string1"
<dionysus69> need to get "string_1"
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
etagwerker has joined #ruby
<phaul> &>> "string1".sub(/(?=\d+)/, '_')
<rubydoc> # => "string_1" (https://carc.in/#/r/7knz)
<dionysus69> thanks phaul
<phaul> yw
alfiemax has quit [Ping timeout: 240 seconds]
BH23 has quit [Ping timeout: 268 seconds]
tsujp has joined #ruby
Huck777 has joined #ruby
arahael2 has joined #ruby
arahael1 has quit [Ping timeout: 268 seconds]
hutch1 has joined #ruby
Swyper has quit [Remote host closed the connection]
BH23 has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
suukim has quit [Quit: Konversation terminated!]
banister_ has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
trebuh has joined #ruby
etagwerker has quit [Remote host closed the connection]
agent_white has quit [Quit: bbl]
Jonopoly has joined #ruby
dbugger has quit [Quit: Leaving]
nibbo has joined #ruby
jrafanie has joined #ruby
fphilipe has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
poontangmessiah has joined #ruby
etagwerker has joined #ruby
chalkmonster has joined #ruby
Nicmavr has joined #ruby
banister_ has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
<trebuh> I currently have an issue with my Ruby installation. I removed every package (using my package manager, dnf) I reinstalled asciidoctor, using my package-manager and I still have the following error, how can I fix it? https://bpaste.net/show/UrNR
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
banisterfiend has joined #ruby
blackmesa has joined #ruby
grilix has joined #ruby
suukim has joined #ruby
alfiemax has joined #ruby
dpl_ has joined #ruby
spiette has quit [Quit: ZNC 1.7.3 - https://znc.in]
dpl has quit [Ping timeout: 245 seconds]
jcalla has joined #ruby
dpl_ has quit [Ping timeout: 240 seconds]
dpl has joined #ruby
spiette has joined #ruby
DTZUZO has quit [Quit: WeeChat 2.0]
ravenousmoose has joined #ruby
DTZUZO has joined #ruby
baojg has quit [Remote host closed the connection]
banister_ has joined #ruby
ravenousmoose has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Ping timeout: 268 seconds]
ellcs1 has joined #ruby
banister_ has quit [Ping timeout: 240 seconds]
lucasb has joined #ruby
blackmesa has quit [Quit: WeeChat 2.6]
drincruz has joined #ruby
blackmesa has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
suukim has quit [Quit: Konversation terminated!]
roaet has joined #ruby
tdy has joined #ruby
<robotcars> why would .to_h not work on 2.6.3, issue happening via homebrew install, and from source on rhel.
hutch1 has quit [Ping timeout: 276 seconds]
<phaul> how does it not work?
<robotcars> undefined method `to_h'
<havenwood> robotcars: is it Ruby 2.6?
<robotcars> 2.6.3
<havenwood> robotcars: double check!
<robotcars> 2.6.1 on rhel, 2.6.3 on desktop/mac
<havenwood> robotcars: by where it fails with #to_h, can you?: p RUBY_VERSION
<havenwood> robotcars: What's the receiver of #to_h? Do you know what it being called on?
<havenwood> it's*
SeepingN has joined #ruby
Esa_ has joined #ruby
Azure has quit [Read error: Connection reset by peer]
xuhui has joined #ruby
xuhui has quit [Client Quit]
schne1der has quit [Ping timeout: 240 seconds]
dpl has quit [Ping timeout: 250 seconds]
<robotcars> nm, didn't have proper key value
bogn has joined #ruby
hutch1 has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
emptyflask has joined #ruby
Esa_ has quit []
rippa has joined #ruby
vdl has quit [Quit: WeeChat 2.3]
vdl has joined #ruby
jrafanie has joined #ruby
banisterfiend has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has quit [Client Quit]
deathwishdave has joined #ruby
blackmesa has quit [Quit: WeeChat 2.6]
davor_ has joined #ruby
davor has quit [Ping timeout: 246 seconds]
davor_ is now known as davor
alfiemax has quit [Remote host closed the connection]
absolutejam1 has quit [Ping timeout: 245 seconds]
alfiemax has joined #ruby
dretnx has joined #ruby
alfiemax has quit [Ping timeout: 245 seconds]
alfiemax has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
tsr has joined #ruby
Esa_ has joined #ruby
hutch1 has quit [Ping timeout: 246 seconds]
cthu| has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
hutch1 has joined #ruby
Guest51714 has joined #ruby
Azure has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
queip has quit [Ping timeout: 265 seconds]
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
baojg has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
gix has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
greypack has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
dpl has joined #ruby
oetjenj has quit [Client Quit]
ellcs1 has quit [Ping timeout: 250 seconds]
queip has joined #ruby
bogn has quit [Quit: Konversation terminated!]
schne1der has joined #ruby
Swyper has joined #ruby
<Swyper> hi
<Swyper> so I am trying to implement a bubble sort
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Swyper> def bubble_sort!(&prc)end
<Swyper> any idea how I can iterate over the proc?
hutch1 has quit [Ping timeout: 246 seconds]
Jonopoly has quit [Quit: WeeChat 2.5]
<phaul> typically ppl would sort an array. what's the role of the proc in your method? Are you trying to sort an array or something else?
banisterfiend has joined #ruby
<Swyper> trying to sort an array
fphilipe has quit [Ping timeout: 264 seconds]
<phaul> ok. what's the role of the proc?
<NL3limin4t0r> Are you using it the same way Array#sort! where it accepts 2 arguments and compares them some way?
<leftylink> for example, does it take *one* element (and does a Schwartzian transform) or *two* (and tells the ordering between those two)?
<leftylink> sorry for jinxing
banisterfiend has quit [Ping timeout: 245 seconds]
<phaul> so to clarify. To implement bubble sort you don't need to take any proc. Just operate on an array. Later when that works you can extend your sort with all sorts of proc support.
thebananaking has quit [Quit: Connection closed for inactivity]
hutch1 has joined #ruby
sputnik13 has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
etagwerker has quit [Remote host closed the connection]
roaet has quit [Ping timeout: 240 seconds]
thadtheman has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
brool has joined #ruby
alfiemax has joined #ruby
alkstal has joined #ruby
<alkstal> f
<alkstal> Hi! I'm learning some Ruby but I'm finding it hard to find any sources on how you work with a Ruby project? Tons of resources regarding syntax but how do you handle a project? Structuring, dependency management, I saw that there are things like Bundler and Rake, how do they fit in? Etc etc.
<alkstal> Basically, how do you put together a project and what tools do you need?
<alkstal> Would appreciate any guidance :)
ramfjord has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
<tsr> alkstal: RubyGems.org has some helpful information related to this: https://guides.rubygems.org/patterns/
<tsr> Additionally, Bundler can create a project skeleton for you: https://bundler.io/v1.14/man/bundle-gem.1.html
alkstal has quit [Ping timeout: 245 seconds]
alfiemax has joined #ruby
FernandoBasso has joined #ruby
alfiemax has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
FernandoBasso has quit [Ping timeout: 260 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
xtolid has quit [Remote host closed the connection]
BH23 has quit [Ping timeout: 240 seconds]
hiroaki has joined #ruby
nowhereman has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has quit [Ping timeout: 265 seconds]
etagwerker has joined #ruby
havenwood has quit [Quit: ZNC 1.7.3 - https://znc.in]
havenwood has joined #ruby
havenwood has joined #ruby
cthulchu_ has joined #ruby
havenwood has quit [Quit: ZNC 1.7.3 - https://znc.in]
cthu| has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
havenwood has joined #ruby
nickwoxs has joined #ruby
havenwood has quit [Client Quit]
elphe has joined #ruby
nickwoxs has quit [Client Quit]
nickwoxs has joined #ruby
nickwoxs has quit [Client Quit]
havenwood has joined #ruby
havenwood has joined #ruby
queip has quit [Ping timeout: 258 seconds]
havenwood has quit [Quit: ZNC 1.7.3 - https://znc.in]
dretnx has quit [Ping timeout: 245 seconds]
jemaddux has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
dbugger has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
ravenousmoose has joined #ruby
queip has joined #ruby
sameerynho has joined #ruby
banisterfiend has joined #ruby
havenwood has joined #ruby
havenwood has joined #ruby
banisterfiend has quit [Ping timeout: 268 seconds]
banister_ has joined #ruby
banisterfiend has joined #ruby
havenwood has quit [Quit: ZNC 1.7.3 - https://znc.in]
havenwood has joined #ruby
havenwood has joined #ruby
cyclonis_ has joined #ruby
cyclonis_ has quit [Max SendQ exceeded]
banister_ has quit [Ping timeout: 265 seconds]
sauvin has quit [Read error: Connection reset by peer]
<kapil_> what is `included {..` word in namespace means?
throstur has quit [Ping timeout: 265 seconds]
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
<kapil_> and how its useful?
throstur has joined #ruby
FrankDW has quit [Changing host]
FrankDW has joined #ruby
<jhass> kapil_: a bit more context needed here :)
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
jemaddux has quit []
<kapil_> i am using rails.
<kapil_> on some models i see the included { ..} block. what it does?
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
absolutejam1 has joined #ruby
dbugger has quit [Quit: Leaving]
Intelo has joined #ruby
<kapil_> in ruby can we declare namespace in a class? what is the meaning of it?
ellcs1 has joined #ruby
chalkmonster has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
dionysus69 has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
etagwerker has quit [Remote host closed the connection]
skryking has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
maartz has joined #ruby
maartz has quit [Remote host closed the connection]
dviola has joined #ruby
cow[moo] has quit [Read error: Connection reset by peer]
cow[moo] has joined #ruby
<jhass> kapil_: in models it seems weird, got a some real example? included is a hook provided by ActiveSupport::Concern https://api.rubyonrails.org/classes/ActiveSupport/Concern.html#method-i-included
<jhass> I don't know what you'
<jhass> what you're referring to with "declare namespace
<jhass> btw there's #RubyOnRails
troulouliou_dev has joined #ruby
<kapil_> thanks
greengriminal has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
schne1der has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
ur5us has joined #ruby
throstur has quit [Ping timeout: 265 seconds]
impermanence has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
dpl has quit [Read error: Connection reset by peer]
cow[moo] has quit [Read error: Connection reset by peer]
cow[moo] has joined #ruby
Ven`` has joined #ruby
throstur has joined #ruby
dpl has joined #ruby
Eiam has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
greengriminal has quit [Quit: Leaving]
ellcs1 has quit [Ping timeout: 250 seconds]
gb_away has quit [Ping timeout: 245 seconds]
gb_away has joined #ruby
grilix has quit [Ping timeout: 268 seconds]
Bish has quit [Disconnected by services]
yasumi2136 has joined #ruby
<brool> noob question, why isn't my class field being properly initialized by #new? https://hastebin.com/alufimodit.rb
jenrzzz has joined #ruby
<ytti> #new is bit of magic
<phaul> there is .new and #initialize. .new is on the "class side" and #initialize is on the instance side
<ytti> it creates new instance of the class, then calls initialize on the newly created class
<leftylink> note carefully the difference between `def new`, `def initialize`, and `def self.new` (I have only ever seen anyone use `def initialize`, I'm not sure I would recommend ... okay I was beaten, I stop typing
<brool> oh? i thought #new was just a convention
<leftylink> consider this, if you add `puts "THIS WAS CALLED"` in your `def new`, you will find that it is not called.
<leftylink> you would have to add `c4.new` for your function to be called
<leftylink> but you probably want to put all that code in `def initialize` instead
<ytti> &>> Class.new.methods.first
<rubydoc> # => :allocate (https://carc.in/#/r/7kqk)
<ytti> oh poo
<ytti> &>> Class.new.methods.grep /new/
<rubydoc> # => [:new] (https://carc.in/#/r/7kql)
thexa4 has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<brool> oh so i change "def new" to "def initialize" and it works
<ytti> &>> class Class;def new;false;end:ned
<rubydoc> stderr: -e:2: syntax error, unexpected ':', expecting end... check link for more (https://carc.in/#/r/7kqm)
<ytti> &>> class Class;def new;false;end;end
<rubydoc> # => :new (https://carc.in/#/r/7kqn)
<ytti> hmm i expected it to break :)
<ytti> &>> class Class;def new;"meh";end;end;k=String.new;p k
<rubydoc> # => "meh"... check link for more (https://carc.in/#/r/7kqo)
<ytti> that's maybe more descriptive
<ytti> what new should do, is call String's initialize
<ytti> but because i rewrote it, it returns meh
robotcars has left #ruby [#ruby]
yasumi2136 has quit [Remote host closed the connection]
tsr has quit [Quit: WeeChat 2.5]
troulouliou_dev has quit [Quit: Leaving]
hiroaki has quit [Ping timeout: 276 seconds]
fphilipe has quit [Ping timeout: 258 seconds]
havenwood has quit [Quit: ZNC 1.7.3 - https://znc.in]
havenwood has joined #ruby
havenwood has joined #ruby
<jhass> You can imagine .new being implemented like def self.new(*args); obj = allocate; obj.initialize(*args); obj; end
banister_ has joined #ruby
<jhass> a bit simplified but if you were to override the default implementation with that, most things should continue working just fine
banisterfiend has quit [Ping timeout: 245 seconds]
cthu| has joined #ruby
r29v has joined #ruby
Guest51714 has quit [Read error: Connection reset by peer]
Guest51714 has joined #ruby
cthulchu_ has quit [Ping timeout: 268 seconds]
tdy has joined #ruby
Xiti` has quit [Quit: Xiti`]
Fernando-Basso has joined #ruby
Xiti has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
queip has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
banister_ has quit [Ping timeout: 245 seconds]
queip has joined #ruby
tdy has quit [Ping timeout: 265 seconds]
Wsewolod has joined #ruby
fphilipe has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
m3ssia has quit [Remote host closed the connection]
m3ssia has joined #ruby
m3ssia has quit [Remote host closed the connection]
pawptart has joined #ruby
m3ssia has joined #ruby
cow[moo] has quit [Ping timeout: 268 seconds]
poontangmessiah has quit [Ping timeout: 245 seconds]
poontangmessiah has joined #ruby
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
ramfjord has joined #ruby
jenrzzz has joined #ruby
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
tdy has joined #ruby
cd has joined #ruby
Intelo_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Intelo has quit [Ping timeout: 268 seconds]
Wsewolod has quit [Read error: Connection reset by peer]
Wsewolod has joined #ruby
davidw_ has joined #ruby
Guest51714 has quit [Read error: Connection reset by peer]
oetjenj has joined #ruby
etagwerker has joined #ruby
fphilipe has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
Wsewolod has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
etagwerker has quit [Ping timeout: 240 seconds]
queip has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Client Quit]
davidw_ has quit [Remote host closed the connection]
davidw_ has joined #ruby
queip has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
davidw_ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
drincruz has quit [Ping timeout: 258 seconds]
throstur has quit [Ping timeout: 240 seconds]
tdy has quit [Ping timeout: 240 seconds]
dpl has quit [Read error: Connection reset by peer]
MrCrackPot has quit [Ping timeout: 268 seconds]
absolutejam1 has quit [Ping timeout: 240 seconds]
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
involans has quit [Quit: involans]
thexa4 has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Intelo_ has quit [Ping timeout: 240 seconds]
davidw has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
davidw is now known as Guest93522
ramfjord has joined #ruby
throstur has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
ramfjord has joined #ruby
Nicmavr has joined #ruby
impermanence has quit [Remote host closed the connection]
thebananaking has joined #ruby
fphilipe has joined #ruby
banisterfiend has quit [Ping timeout: 258 seconds]
_whitelogger has joined #ruby
knight- has quit [Ping timeout: 245 seconds]
cow[moo] has joined #ruby
Esa_ has quit []