<sevenseacat>
and you might not have it left by the time bundle does its thing
viszu has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
fourq has quit [Quit: Lost terminal]
<angela>
sevenseacat: but isn't it a bit weird that a process can eat up all 270 MB of memory?
<sevenseacat>
you're using ruby, soooo.... no.
<angela>
damn, I only have 500 MB in RAM in total
<angela>
guess install it won't be an option them
nso95 has quit [Quit: Page closed]
Targen has joined #ruby
Neener54 has joined #ruby
buzzybron has joined #ruby
codezombie has joined #ruby
vlad_starkov has joined #ruby
<buzzybron>
hi i'm using aptana and i was thinking of using the debug function to debug my ruby script, how do i do that? anyone knows? i have already installed the gems for ide debugging
<buzzybron>
can't seem to find the debug functions like step in to or inspecting vars
ssvo has joined #ruby
mrsolo has joined #ruby
pwh has quit [Quit: pwh]
vlad_starkov has quit [Ping timeout: 264 seconds]
_1_EYADO has joined #ruby
jhn has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
parzo has quit [Remote host closed the connection]
aryaching has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwh has joined #ruby
iamjarvo has quit [Remote host closed the connection]
parzo has joined #ruby
iamjarvo has joined #ruby
ryandeussing has joined #ruby
<_1_EYADO>
hi
_1_EYADO has left #ruby [#ruby]
viszu has quit [Quit: Leaving.]
zachrab has joined #ruby
angela has left #ruby [#ruby]
jamesaanderson has joined #ruby
iamjarvo has quit [Ping timeout: 264 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
saarinen has joined #ruby
saarinen has quit [Client Quit]
ryandeussing has quit [Ping timeout: 256 seconds]
jarray52 has left #ruby [#ruby]
mrsolo has joined #ruby
viszu has joined #ruby
jbomo has joined #ruby
parzo_ has joined #ruby
diffkid_ has quit [Read error: Connection reset by peer]
parzo has quit [Ping timeout: 240 seconds]
ngoldman has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
anonymuse has joined #ruby
brettnem has quit [Quit: brettnem]
ssvo has quit [Ping timeout: 240 seconds]
io_syl has quit [Quit: io_syl]
Ripp__ has joined #ruby
thesheff17 has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 256 seconds]
cmarques has quit [Ping timeout: 264 seconds]
brettnem has joined #ruby
mando has joined #ruby
hadees has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
cajueiro has quit [Remote host closed the connection]
wesside has quit [Quit: Computer has gone to sleep.]
eldariof has quit [Read error: Operation timed out]
ssvo has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Read error: Operation timed out]
Quashie has joined #ruby
bluOxigen has joined #ruby
Quashie_ has quit [Ping timeout: 264 seconds]
Orxata_ has quit [Quit: Me'n vaig]
JohnBat26 has joined #ruby
Xeago has joined #ruby
brettnem has quit [Quit: brettnem]
pen has quit [Read error: Connection reset by peer]
parzo has joined #ruby
blueOxigen has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
dlind_ is now known as dlind
kaspergrubbe has joined #ruby
decoponio has joined #ruby
mansi has joined #ruby
senayar has joined #ruby
ahawkins has joined #ruby
<buzzybron>
how do i do debugging for ruby?
echevemaster has quit [Quit: Leaving]
aganov has joined #ruby
cj3kim has joined #ruby
ahawkins has quit [Client Quit]
kritztopf has joined #ruby
ahawkins has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
tonni has quit [Ping timeout: 264 seconds]
bubbajones has joined #ruby
decoponio has quit [Quit: My PC restarting]
gr33n7007h has joined #ruby
artm has joined #ruby
jbpros has joined #ruby
senayar_ has joined #ruby
jonkri has joined #ruby
maz-dev has joined #ruby
kilophoton has quit [Ping timeout: 245 seconds]
jds_ has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 264 seconds]
anderson has joined #ruby
jstephan has joined #ruby
jstephan has quit [Changing host]
jstephan has joined #ruby
Quashie has quit [Ping timeout: 245 seconds]
jstephan is now known as johest
mneorr has joined #ruby
iliketur_ has joined #ruby
<zendeavor>
the same way you do in every language with a repl
<zendeavor>
open the repl and start inspecting
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<canton7>
look into Pry
<zendeavor>
irb is shipped by default, pry is a popular alternative
<apeiros>
you can use pry from within your app, use `binding.pry`
<apeiros>
and with additional gems, you can step through code. ruby 1.8: pry-nav, 1.9: pry-debugger, 2.0: pry-byebug
MrZYX is now known as MrZYX|off
tonni has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
Senjai has quit [Ping timeout: 264 seconds]
fbernier has quit [Ping timeout: 268 seconds]
MrZYX|off is now known as MrZYX
decoponio has joined #ruby
m8 has joined #ruby
timonv has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
dodosan has quit [Remote host closed the connection]
GeissT has joined #ruby
sparq_ has quit [Ping timeout: 245 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
aryaching has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
Zolo has joined #ruby
aryaching has joined #ruby
gr33n7007h has quit [Ping timeout: 264 seconds]
Coffers has joined #ruby
_JamieD_ has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
Anticom has joined #ruby
Wildhoney has joined #ruby
lepht_afk has quit [Quit: lepht->out]
lepht_afk has joined #ruby
kjellski has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
_JamieD_ has quit [Client Quit]
aryaching has quit [Ping timeout: 240 seconds]
iliketur_ has quit [Quit: zzzzz…..]
dangerousdave has joined #ruby
blaxter_ has joined #ruby
Mon_Ouie has joined #ruby
maxmanders has joined #ruby
pen has joined #ruby
hamed_r has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
gr33n7007h has joined #ruby
starfox21 has joined #ruby
afd__ has joined #ruby
afd__ has quit [Read error: Connection reset by peer]
gr33n7007h has quit [Max SendQ exceeded]
afd__ has joined #ruby
robbyoconnor has quit [Read error: Operation timed out]
gr33n7007h has joined #ruby
andikr has joined #ruby
tonni has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
camilasan has joined #ruby
jibi has joined #ruby
blackmesa has joined #ruby
starfox21 has quit [Quit: starfox21]
fbernier has joined #ruby
mklappstuhl has joined #ruby
cha1tanya has joined #ruby
timonv has joined #ruby
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
user258467 has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 256 seconds]
blackmesa has quit [Remote host closed the connection]
blackmesa has joined #ruby
Al_ has joined #ruby
troessner has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
greenysan has joined #ruby
Wildhoney has quit [Quit: Wildhoney]
tvw has quit []
tvw has joined #ruby
d45h has quit [Quit: d45h]
ehaliewicz has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
ewnd9 has joined #ruby
tonni has joined #ruby
[[thufir]] has joined #ruby
camilasan has quit [Remote host closed the connection]
LMolr has joined #ruby
pen has quit [Remote host closed the connection]
nemesit|znc has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
AzizLight has joined #ruby
camilasan has joined #ruby
io_syl has quit [Quit: io_syl]
sergicles has quit [Quit: sergicles]
razi has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
tundrax has quit [Remote host closed the connection]
BrianJ has quit [Quit: Computer has gone to sleep.]
visof has joined #ruby
kilophoton has joined #ruby
thebastl has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
niceguyjames has joined #ruby
jonkri has quit [Quit: jonkri]
ghr has joined #ruby
_JamieD_ has joined #ruby
_JamieD_ has quit [Client Quit]
pen has joined #ruby
Wildhoney has joined #ruby
kilophoton has quit [Ping timeout: 264 seconds]
anderson has quit [Ping timeout: 268 seconds]
starfox21 has joined #ruby
vlad_starkov has joined #ruby
mneorr has quit [Remote host closed the connection]
ehaliewicz has quit [Ping timeout: 264 seconds]
obs has joined #ruby
thirdknife has joined #ruby
lepht_afk is now known as lepht
<thirdknife>
hi
noname001 has joined #ruby
riginding has joined #ruby
<thirdknife>
I have a string let say 1000 charcters of length, I want it to split in 10 lines 100 chars each. any suggestions>
timonv has quit [Remote host closed the connection]
<thirdknife>
?
<thirdknife>
I have a string let say 1000 charcters of length,
anderson has joined #ruby
<thirdknife>
I want it to split in 10 lines 100 chars each. any suggestions>
<hoelzro>
you just want to split it into 10 separate strings?
mklappstuhl has quit [Remote host closed the connection]
rdark has joined #ruby
<thirdknife>
no I want to add carriage return at the end
<thirdknife>
after each 100 chars
fsck3r has quit [Quit: Leaving...]
<MrZYX>
why \r, why not \n?
jefflyne has joined #ruby
<thirdknife>
yeah \n
<thirdknife>
but how do I append in between
<MrZYX>
.scan(/.{1,100}/).join("\n") I'm sure there's a better way but I can't think of anything atm
Zai00 has joined #ruby
pen has quit [Remote host closed the connection]
<thirdknife>
It didn't worked
<MrZYX>
well, I tested it
companion is now known as Companion
adambeynon has joined #ruby
ryandeussing has joined #ruby
lepht is now known as lepht_afk
shredding has joined #ruby
<thirdknife>
yeah in ruby repl it worked
jonkri has joined #ruby
<thirdknife>
I am writing a pdf with prawn
dodosan has joined #ruby
shaunbaker has joined #ruby
ryandeussing has quit [Ping timeout: 245 seconds]
raar has quit [Ping timeout: 268 seconds]
* apeiros
would use gsub instead of scan+join
<apeiros>
won't change "didn't work" because that problem obviously lies elsewhere
pedda has joined #ruby
<apeiros>
str.gsub(/.{1,100}/, "\\0\n")
user258467 has joined #ruby
_md has joined #ruby
<MrZYX>
hm probably a bit faster but I always find gsub with reinserting matches a bit hard to read
<apeiros>
matter of getting used to
<apeiros>
I find reading two calls harder than one call ;-)
dodosan has quit [Ping timeout: 245 seconds]
lepht_afk is now known as lepht
saarinen has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
mrsolo has quit [Quit: Leaving]
thebastl has joined #ruby
saarinen has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 240 seconds]
zachrab has quit [Remote host closed the connection]
maz-dev has quit [Remote host closed the connection]
maz-dev has joined #ruby
ahawkins has quit [Ping timeout: 245 seconds]
ryandeussing has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
end_guy_ has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
weems has quit [Ping timeout: 256 seconds]
thelamest has quit [Quit: rebook]
lyanchih has quit [Quit: lyanchih]
Alina-malina has joined #ruby
nomenkun has joined #ruby
klaut has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
r0bglees0n has quit [Ping timeout: 264 seconds]
staafl has joined #ruby
Evixion has joined #ruby
agjacome has joined #ruby
<krz>
ive got a method foo, which accepts arguments like (1,2,3). however, i have an array [1,2,3]. how do i pass the values of the array into the method?
<krz>
as 1,2,3 instead of [1,2,3]
<hoelzro>
krz: method(*array)
nomenkun has quit [Remote host closed the connection]
<krz>
hoelzro: i have no access to the method
<krz>
i need to work with the array
<hoelzro>
could you paste some code?
blackmesa has joined #ruby
<hoelzro>
that will help clarify things
AzizLight has quit [Ping timeout: 256 seconds]
<MrZYX>
krz: in case that was not obvious for you: method(*array) is the method call, not the method definition
nomenkun has joined #ruby
<krz>
foo accepts (1,2,3,etc) i need to feed it the values from an array. i have array: bar = [1,2,3]. i cant do foo(bar)
<krz>
because that will interpret it as foo([1,2,3])
<tobiasvl>
foo(*bar)
<krz>
it needs to be foo(1,2,3)
<tobiasvl>
like hoelzro said
<krz>
i dont have access to the method foo
<apeiros>
krz: that's how you *call* it
<tobiasvl>
?!?!?!?!?!?
<sevenseacat>
lol
<apeiros>
he's not telling you how to define it
<tobiasvl>
"i cant do foo(bar)" <- no, but you can do foo(*bar)
<tobiasvl>
i inserted a splat operator (*) into the method call you gave us
aaronmcadam has joined #ruby
<tobiasvl>
so that should be straight forward
<apeiros>
your method is defined as `def foo(a,b,c)`, ok, fine. and you call it like `x = foo(*array)`
<apeiros>
no change of the implementation needed.
mansi has joined #ruby
<krz>
ah! *bar
<tobiasvl>
yes
Zolo has quit [Remote host closed the connection]
AzizLight has joined #ruby
mikecmpbll has joined #ruby
LMolr has quit [Ping timeout: 245 seconds]
<jrobeson>
lol
<apeiros>
it took only 3 people telling him the same thing for him to believe it :D
mansi has quit [Ping timeout: 256 seconds]
sevenseacat has quit [Quit: Leaving.]
<apeiros>
you know what that means, though, right? We all suck at explaining ;-D
BizarreCake has joined #ruby
guiocavalcanti has joined #ruby
<jrobeson>
well just seeing method(*array) would have been confusing for me.. i might have assumed changing the method def also..
<jrobeson>
but .. this was pretty clear
<jrobeson>
<MrZYX> krz: in case that was not obvious for you: method(*array) is the method call, not the method definition
<apeiros>
well, if you're around here for a while, you'll notice that you always get `def foo` for method definitions
<apeiros>
also that :)
blackmesa has quit [Ping timeout: 240 seconds]
fixl has joined #ruby
lepht is now known as lepht_afk
marr has joined #ruby
thebastl has quit [Remote host closed the connection]
Wildhoney has quit [Quit: Wildhoney]
Es0teric has quit [Quit: Computer has gone to sleep.]
Wildhoney has joined #ruby
ahawkins has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
guiocavalcanti has quit [Ping timeout: 245 seconds]
tjad has joined #ruby
shredding has quit [Quit: shredding]
cj3kim has quit [Remote host closed the connection]
hamed_r has quit [Ping timeout: 268 seconds]
randomau_ has quit [Read error: Connection reset by peer]
lemonsparrow has quit [Ping timeout: 250 seconds]
SHyx0rmZ has joined #ruby
randomautomator has joined #ruby
<joshu>
hi
<joshu>
I have some code that looks like this https://gist.github.com/anonymous/c2edccf79192d7d8b5a6 Is it possible to get the method's named parameter when it is called? For instance on L4 when the method "call" named parameter :onAnswer is executed can I within the "onAnswer" do something like put #{method named parameter} ?
randomautomator has quit [Ping timeout: 264 seconds]
nari has joined #ruby
gildo has joined #ruby
kritztopf has quit [Quit: WeeChat 0.4.1]
lkba has quit [Ping timeout: 245 seconds]
Criztian has joined #ruby
sergicles has joined #ruby
ewnd9 has quit [Remote host closed the connection]
lepht_afk is now known as lepht
thebastl has joined #ruby
SHyx0rmZ has quit [Ping timeout: 264 seconds]
Zolo has joined #ruby
freeayu3 has joined #ruby
freeayu__ has quit [Ping timeout: 245 seconds]
_axx_ is now known as _axx
maxmanders has quit [Ping timeout: 264 seconds]
anonymuse has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
SHyx0rmZ has joined #ruby
SHyx0rmZ has joined #ruby
maxmanders has joined #ruby
maz-dev has quit [Remote host closed the connection]
maz-dev has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
Dave is now known as Guest64823
ewnd9 has joined #ruby
kjellski has quit [Ping timeout: 264 seconds]
yojimbo_ has joined #ruby
cj3kim has joined #ruby
LMolr has joined #ruby
mengu has joined #ruby
mansi has joined #ruby
gr33n7007h has joined #ruby
persand has quit [Quit: persand]
basex has joined #ruby
lemonsparrow has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
anonymuse has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
osvico has quit [Ping timeout: 264 seconds]
<krz>
class Foo has include Bar. in module Bar. how do i reference class Foo?
osvico has joined #ruby
<Olipro>
is there any way to preserve YAML splat symbols when converting YAML to a hash, editing the hash and then converting back to YAML?
<MrZYX>
krz: reference Foo in what way?
tk__ has joined #ruby
<krz>
MrZYX: if Foo calls a method in Bar. how does Bar know which class called the method?
<krz>
i.e. Foo
<MrZYX>
why does Bar need to know?
<krz>
because i need to do something with the class name
<krz>
i.e. im creating a redis key based on which class called the method in module Bar
girija__ has joined #ruby
<MrZYX>
sounds a bit like a broken design but self.class.name should do
JohnBat26 has joined #ruby
<apeiros>
self.class actually
ewnd9 has quit [Ping timeout: 240 seconds]
<apeiros>
self.class.name will be a String, not the class itself
<krz>
ah. i tried with class.name. didnt know i needed self
<apeiros>
class is a keyword
<apeiros>
so you must make it explicitly a method call
<MrZYX>
apeiros: he later said he "needs to do something with the class name"
<apeiros>
which you do by either having an explicit receiver (self.) or by using parens (class())
<apeiros>
MrZYX: ah, ok
<apeiros>
in that case, I retract my first statement :)
<MrZYX>
;)
girija_ has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
vlad_starkov has joined #ruby
threeturn has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<Xeago>
but how does that solve his problem?
<Xeago>
doesn't he want ton know about Foo within the method that is called on Bar?
<Xeago>
never mind
<Xeago>
I read his earlier question before he rephrased
Villadelfia has quit [Quit: Computer has gone to sleep.]
dangerousdave has joined #ruby
jefflyne has joined #ruby
vlad_starkov has joined #ruby
Villadelfia has joined #ruby
mengu has quit [Read error: Connection reset by peer]
thebastl has quit [Remote host closed the connection]
persand has joined #ruby
Villadelfia has quit [Client Quit]
girija__ has quit [Ping timeout: 256 seconds]
realDAB has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
Companion is now known as companion
haxrbyte_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
cads has joined #ruby
haxrbyte_ has joined #ruby
eka has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
nfk has joined #ruby
mklappstuhl has quit [Read error: Operation timed out]
zoee has joined #ruby
cj3kim has joined #ruby
<shevy>
krz you could try to get a backreference through caller()
vlad_starkov has joined #ruby
mlpinit has joined #ruby
yalue has joined #ruby
lucazi has joined #ruby
wmoxam has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
maz-dev has joined #ruby
__Cr0 has quit []
starship has joined #ruby
pranny has quit [Quit: Leaving.]
zarubin has joined #ruby
thebastl has joined #ruby
greenrose1 is now known as greenrose
<Xeago>
why does this http://hastebin.com/pewolasoto give a SyntaxError: /vagrant/app/models/invoice.rb:14: syntax error, unexpected ':', expecting keyword_end
<Xeago>
at ..return result_:_ result..
<apeiros>
Xeago: I assume return being syntax does not accept braces-less hashes
<shevy>
Kernel::Array() # ArgumentError: wrong number of arguments(0 for 1)
tagrudev has quit [Remote host closed the connection]
<shevy>
Object::Array() # NoMethodError: private method `Array' called for Object:Class
Jake232 has joined #ruby
<shevy>
brotspinne why do you have such a strange nick! I hate spiders
braoru has quit [Read error: Connection reset by peer]
<MrZYX>
shevy: it's probably also a module_function on Kernel so the :: there is a method call
realDAB has quit [Quit: realDAB]
<hoelzro>
it's kind of like how x can be a local variable or a method call
<hoelzro>
depending on context
kpshek has joined #ruby
<hoelzro>
Array is both a method and a constant
<brotspinne>
ok so how to do this? I do Kernel.define_method :MyClass …but what is with MyClass.new?
<hoelzro>
it has nothing to do with the method
cody-- has joined #ruby
<hoelzro>
they're unrelated
<hoelzro>
other than in name and that one uses the other
<brotspinne>
hoelzro: so you mean when the class is there and I call a class method (or new) on it ruby thinks I call the class instead of the method with the same name defined on kernel?
<hoelzro>
hmm
interactionjaxsn has joined #ruby
<hoelzro>
I believe so
browndawg has joined #ruby
<hoelzro>
I'm not sure what the resolution rule is
<hoelzro>
I wrote it down in a notebook once
tricon- has joined #ruby
blackmesa has joined #ruby
<brotspinne>
hmm
Tricon has quit [Read error: Connection reset by peer]
tricon_ has quit [Read error: Connection reset by peer]
<brotspinne>
so that implies that it would never be possible to do things like @foo(42) right?
jerius has quit [Ping timeout: 246 seconds]
<hoelzro>
correct
<brotspinne>
instead I could go with @foo[42]
<brotspinne>
ok
<hoelzro>
@foo.(42), yes
<brotspinne>
what is @foo.(42)?
dangerousdave has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
intuxicated has quit [Remote host closed the connection]
<hoelzro>
it calls the () method on whatever object is referred to by @foo
<brotspinne>
banister: any thoughts on the conflict class vs. global method with same name resolution?
bondar has joined #ruby
<banister>
brotspinne not sure what u mean
ewnd9 has quit [Ping timeout: 248 seconds]
rh1n0 has joined #ruby
twoism has joined #ruby
AlHafoudh has joined #ruby
AlHafoudh has quit [Max SendQ exceeded]
_maes_ has joined #ruby
johnnyfuchs has joined #ruby
<banister>
banister you mean like Array() vs Array ?
vlad_starkov has joined #ruby
<banister>
err, brotspinne
<brotspinne>
yes ;D
twoism has quit [Remote host closed the connection]
pentameter has joined #ruby
AlSquire has quit [Remote host closed the connection]
dustin1 has joined #ruby
twoism has joined #ruby
brennanMKE has joined #ruby
rcosta has quit [Ping timeout: 248 seconds]
<banister>
brotspinne can you explain the situation when there'd be a conflict?
rh1n0 has quit [Client Quit]
intuxicated has joined #ruby
hogeo has joined #ruby
<hoelzro>
I think the confusion is in statements like this:
blaxter_ has quit [Read error: Connection reset by peer]
<hoelzro>
puts(Array)
rh1n0 has joined #ruby
<hoelzro>
is the class object used, or is the method called?
<brotspinne>
banister: the question is about if ruby does first resolve the identifier ("MyClass") or first looks how it is invoked (MyClass.foo vs MyClass())
blaxter_ has joined #ruby
<banister>
brotspinne it would look at how it's invoked
<banister>
to determine if it's a method call and so on
<brotspinne>
ok makes sense
<lupine>
that's used in more than no libraries. IPAddress(string) for instance
<lupine>
(in conjunction with the existence of an IPAddress class)
<lupine>
as an idiom, I don't really like it
mary5030 has joined #ruby
<banister>
brotspinne it's basically a fake constructor
<banister>
that can look prettier than MyClass.new()
GeissT has quit [Quit: MillBroChat AdIRC User]
rh1n0 has quit [Client Quit]
<brotspinne>
yeah the usability is clear to me
I-saac has quit [Ping timeout: 248 seconds]
jjbohn is now known as jjbohn|afk
sambao21 has joined #ruby
<brotspinne>
I guess there's only one case in which it makes sense to use Array() and this is when you want to wrap something into an array. because [foo] looks unintended. but rails already has a nicer Array.wrap() method
brennanMKE has quit [Ping timeout: 276 seconds]
<brotspinne>
which does not rewrap
Evixion has quit [Read error: Connection reset by peer]
rrichardsr3 has joined #ruby
axl__ has joined #ruby
twoism_ has joined #ruby
sailias has quit [Ping timeout: 268 seconds]
axl_ has quit [Ping timeout: 240 seconds]
axl__ is now known as axl_
<hanmac>
brotspinne & lupine & Banister & hoelzro: if there is a Constant and a method with the same name, without parameters and without () the const is returned, if there are parameters or () then the method is called
Yakko has joined #ruby
<hoelzro>
thanks Hanmac
Evixion has joined #ruby
turduks has joined #ruby
jjbohn|afk is now known as jjbohn
<brotspinne>
Hanmac: nice
freerobby has joined #ruby
twoism has quit [Ping timeout: 264 seconds]
noopq has quit [Ping timeout: 240 seconds]
poga has joined #ruby
twoism has joined #ruby
twoism_ has quit [Read error: Connection reset by peer]
<hanmac>
addional info: ::Array always return the constant with :: you cant get the method (parameter and () makes syntax error)
<brotspinne>
so would you consider not to using this idiom for custom classes because it would be required to clutter the kernel class?
anonymuse has quit [Remote host closed the connection]
<thirdknife>
I want to generate a random string with capital letter only of length 10
AlSquire has quit [Remote host closed the connection]
AlSquire has joined #ruby
niceguyjames has joined #ruby
ahawkins has joined #ruby
persand has quit [Quit: persand]
niceguyjames has quit [Client Quit]
twoism_ has quit [Read error: Connection reset by peer]
twoism has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
girija__ has joined #ruby
jjbohn is now known as jjbohn|afk
twoism has joined #ruby
BRMatt has joined #ruby
wolcanus has quit [Remote host closed the connection]
turduks has quit [Ping timeout: 260 seconds]
<Orxata_>
Question: Is there a way to parse a file with N lines, each line with the format <a atr1="ble" atr2="bla"... href="https://bli" atrN="blo"> and only retrieve the href atribute?
<hoelzro>
use an HTML parser?
rippa has joined #ruby
mary5030 has quit [Read error: Operation timed out]
viszu has quit [Quit: Leaving.]
wolcanus has joined #ruby
<Orxata_>
hm...
maz-dev has quit [Remote host closed the connection]
wolcanus has quit [Remote host closed the connection]
<Orxata_>
like nokogiri?
realDAB has joined #ruby
pranny1 has quit [Quit: Leaving.]
jamesaanderson has joined #ruby
endash has joined #ruby
<hanmac>
Orxata_: yeah
viszu has joined #ruby
mrsolo has joined #ruby
tonni has quit [Ping timeout: 245 seconds]
zoee has joined #ruby
S0da has quit [Remote host closed the connection]
mary5030 has joined #ruby
<Orxata_>
also I have a problem which is not directly related with ruby
<brisbin>
Orxata_: if it's that well formed, and not actually html... sed 's/.*\(href=".*"\).*/!d; //\1' file
<Orxata_>
oh
brennanMKE has joined #ruby
<Orxata_>
thank you very much, I was looking for a RegExp
<brisbin>
sorry, sed '/.*\(href=".*"\).*/!d; s//\1/g'
Hobogrammer has joined #ruby
AlSquire has quit [Quit: Quitte]
Anticom has quit [Ping timeout: 245 seconds]
codecop has joined #ruby
blaxter_ has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<Aloysius1>
Hey, all...I'm trying to build an Rspec for testing a matrix of values. Looking for an elegant way to do it. So, if I have matrix m, I can go through all the rows and columns and test for "my_test_object.value.should eq(matrix[x,y])". Looking for a standard/elegant way to do this rather than just matrix["row1", "col1"] = "expected value".
soulcake has quit [Read error: Connection reset by peer]
clov3r has quit [Remote host closed the connection]
<Fractional>
Hi everybody. I've a question. How do I make a object that I can access within another class without making it global?
soulcake has joined #ruby
cek has joined #ruby
<cek>
how do i "should_eventually" in rspec?
mansi has quit [Read error: Connection reset by peer]
jamesaanderson has joined #ruby
<ccooke>
suffix: well, for instance, this should do it:
<Aloysius1>
Fractional: I think you have to be more specific. Do you mean any other class at all?
<Fractional>
Is there a way to send private messages here?
<cek>
xit
cek has quit [Client Quit]
mikepack has joined #ruby
jacktrick has quit [Quit: Leaving]
biesiad has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
<Fractional>
Aloysius1: I
<ezra>
suffix: sprintf("%02d", num) ?
<Fractional>
Aloysius1: I'm writing up an example.
<ccooke>
suffix: but that will be a little dangerous, since gsub(/\D/,"") will not always do the right thing if your input string isn't formatted exactly right
<ccooke>
suffix: for instance, what if the input string contained a number with a decimal point? Or two numbers with some text between?
<Aloysius1>
Fractional: You would either pass the player to the Game, or create the player within the game. There are other, subtler or more complex answers, but a lot would have to do with what your goal with Game and Player are.
hogeo has quit [Ping timeout: 245 seconds]
<Fractional>
That's just a example of how I want it. What would the best way be to do this?
iamjarvo has quit [Remote host closed the connection]
<Aloysius1>
well, with what you have, not knowing anything about the design, why not "def intiialize player" and force the player to be passed to the game?
iamjarvo has joined #ruby
<Fractional>
Can a object pass itself through a method to another class?
anderson has quit [Ping timeout: 240 seconds]
basex has joined #ruby
zeade has joined #ruby
adeponte has joined #ruby
Elhu has joined #ruby
<Aloysius1>
Sure.
<Fractional>
Ok. I'm quite new to Ruby and not very familiar with it.
<Fractional>
What's this called (:name)?
<Aloysius1>
The colon before unquoted text indicates a symbol.
apeiros has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<digital-ghost>
I am trying to understand symbols better right now.
<Fractional>
So, if I would like to look into them, what should I search for? Symbols in Ruby?
iamjarvo has quit [Ping timeout: 245 seconds]
<Aloysius1>
That'd work. Symbols are a very simple concept; they just seem mysterious at first.
ffranz has quit [Quit: Leaving]
tonni has joined #ruby
sayan has joined #ruby
snath has quit [Ping timeout: 248 seconds]
noname001 has quit [Ping timeout: 245 seconds]
Monie has joined #ruby
sailias has joined #ruby
<Fractional>
Thank you very much my friend!
<digital-ghost>
How do you use symbols with the new replacement for hash rockets? Like 'class: :some_symbol'
<digital-ghost>
That syntax always seems to error.
dhruvasagar has joined #ruby
jonkri has quit [Quit: jonkri]
<ayonix>
it's generally correct though
devoldmx3 has quit [Read error: Connection reset by peer]
lunaphyte_ has left #ruby [#ruby]
<Fractional>
So a symbol is a value with a name? :P
<Aloysius1>
A symbol is an identity. It is what it says on the tin. Heh.
<Fractional>
How can I add a parameter to a method that is optional?
dankest has joined #ruby
<Aloysius1>
Fractional: Optional parameters must be the last ones in a method, and you assign a value, like "def fn parm=0"
<Aloysius1>
Fractional: More idiomatically, accept a hash and you can pretend Ruby has named parameters.
Targen has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
Ruby does have named parameters now
Nogbit has joined #ruby
iamjarvo has quit [Remote host closed the connection]
<Aloysius1>
Mon_Ouie: Good point. In 2.0.
<MrZYX>
can't you have optional params in the middle or beginning now as long as they're grouped?
<havenwood>
I have yet to actually use kwargs in 2.0, need to jump on that bandwagon.
kaspergrubbe has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<havenwood>
Still hashes underneath in 2.1?
<Mon_Ouie>
That too (since 1.9)
ntus1017 has quit [Remote host closed the connection]
<Fractional>
def dosomething(p1, p2) - Would that make the parameter p2 optional?
<Mon_Ouie>
No
<Mon_Ouie>
def dosomething(p1, p2 = some_default_value) will
maz-dev has joined #ruby
turduks has quit [Remote host closed the connection]
<Fractional>
Do I need to set it to a default value?
<MrZYX>
what would be the value you expect if you wouldn't and it's not given?
danshultz has joined #ruby
<havenwood>
Fractional: If there is an arg, you've got to set a value if you want it to not throw an error when no args are provided when the method is called. Set the default to make providing that argument optional.
camilasan has quit [Remote host closed the connection]
<Fractional>
Ok. Thanks a bunch guys! Really appreciated! :)
benlieb has joined #ruby
zoee has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Ping timeout: 245 seconds]
<banister>
Mon_Ouie 'alut
<banister>
Mon_Ouiewhat is 'allspice' (a spice) in dutch/flemish?
<banister>
Mon_Ouie
mansi has quit [Remote host closed the connection]
Nogbit has quit [Ping timeout: 260 seconds]
Nogbit1 has joined #ruby
chrisja has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
ghr has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
itcharlie has joined #ruby
turduks has joined #ruby
colonolGron has quit [Quit: Lost terminal]
turduks has quit [Client Quit]
timonv has joined #ruby
spider-mario has joined #ruby
caju has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
<Mon_Ouie>
No clue
<havenwood>
piment
wallerdev has quit [Read error: Connection reset by peer]
Davey has joined #ruby
wallerdev has joined #ruby
devoldmx has joined #ruby
trinode_away has quit [Ping timeout: 264 seconds]
mansi has quit [Remote host closed the connection]
<banister>
havenwood thanks
lukec has joined #ruby
<banister>
havenwood i was convinced google translate wouldn't be able to help me, but turns out it did have a word for it ;)
mansi has joined #ruby
mityaz has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
parzo has quit [Remote host closed the connection]
parzo has joined #ruby
trinode_away has joined #ruby
trinode_away is now known as trinode
<havenwood>
banister: Google Translate is getting better, I swear!
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
cha1tanya has joined #ruby
iliketur_ has joined #ruby
<havenwood>
I should use allspice more. Would be fun to make jerk chicken or mole.
<Olipro>
is there a more efficient way than using each_slice on [1,2,3,4,5,6] to convert it to [[1,2],[3,4],[5,6]]
huoxito has joined #ruby
shaunbaker has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 245 seconds]
<banister>
havenwood well it needs to if things like google glass are really going to take over the world :) I've seen some interesting augmented reality apps where you look at a sign written in one language and google glass rewrites the word in the destination language, using the same font, and superimposes it on the sign (replacing the original text)
<banister>
Olipro arr.each_slice(2).to_a
<havenwood>
banister: Yeah, got that on my phone - but it would be actually more than a parlor trick in augmented reality form.
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DanKnox_away is now known as DanKnox
benlieb has quit [Quit: benlieb]
realDAB has quit [Quit: realDAB]
pen has quit [Remote host closed the connection]
freerobby has joined #ruby
<banister>
havenwood you got yourself a chrome cast yet btw?
hogeo has joined #ruby
snovak has joined #ruby
blaxter has quit [Quit: foo]
<havenwood>
banister: Nope, actually haven't ordered one. Almost did when you mentioned it the other week but didn't click buy.
tjad has joined #ruby
ColKurtz has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
graydot has joined #ruby
andikr has quit [Remote host closed the connection]
ebobby has joined #ruby
dankest has quit [Quit: Peace]
basex has quit [Quit: basex]
<banister>
havenwood do u have a paypal? i could send u the money and if it's not too much effort you could send me one ? :) I'd include some extra $ for a beer for your troubles :)
snovak_ has quit [Ping timeout: 268 seconds]
jongilbraith has joined #ruby
chrisja has quit [Ping timeout: 245 seconds]
emergion has joined #ruby
<havenwood>
banister: Sure, i'll order ya one. Pretty sure i've got a PayPal but I never use it.
sambao21 has quit [Quit: Computer has gone to sleep.]
jonkri has joined #ruby
jonkri has joined #ruby
jonkri has quit [Changing host]
ebobby has left #ruby [#ruby]
apeiros has joined #ruby
Voodoofish430 has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
Wildhoney has quit [Quit: Wildhoney]
lucazi has quit [Ping timeout: 256 seconds]
dangerousdave has quit [Quit: Leaving...]
Elhu has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby
jongilbraith has quit [Client Quit]
emergion has quit [Ping timeout: 260 seconds]
wolcanus has quit [Read error: Connection reset by peer]
bw_ has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
wolcanus has joined #ruby
JDHankle has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
klaut has quit [Remote host closed the connection]
danshultz has joined #ruby
<Eiam>
oh man ,allspice gag
Al_ has quit [Quit: Al_]
tylersmith has joined #ruby
troessner has quit [Quit: Leaving]
<Eiam>
I tried some allspice + green chartreuse concoction.. it smelled like Fall & thanksgiving..
<Eiam>
tasted like assess =(
thirdknife has joined #ruby
bw_ has joined #ruby
<Eiam>
banister: what stops you from making the order yourself?
suffix has quit [Ping timeout: 248 seconds]
<Eiam>
(my curiosity)
<banister>
Eiam i don't live in USA
<banister>
and they don't ship outside USA afaik
<Eiam>
they don't sell them to people outside the USA?
<Eiam>
typical google, ignores international customers.
<banister>
based on a quick google i did the other day, they don't yet
<Eiam>
and I was just talking to localization about my features and ensuring they had done some looking into things =)
<Eiam>
cause I CARE ABOUT INTERNATIONAL USERS!
Targen has joined #ruby
suffix_ has joined #ruby
wolcanus has quit [Read error: Connection reset by peer]
<havenwood>
banister: Yeah, on the order form they have phone number i18n but the country pulldown is greyed out on US.
biesiad has quit [Quit: biesiad]
wolcanus has joined #ruby
Trynemjoel has joined #ruby
<Eiam>
bummer
tommyvyo[cloud]_ is now known as tommyvyo
<Eiam>
well, I'm happy to help if havenwood gets pre occupied
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
wolcanus has left #ruby [#ruby]
futilegames has quit [Quit: futilegames]
brennanM_ has joined #ruby
altamic has joined #ruby
altamic has left #ruby [#ruby]
aetaric has quit [Ping timeout: 264 seconds]
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aetaric has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
brennanMKE has quit [Ping timeout: 276 seconds]
bricker`away is now known as bricker`work]
i_s has joined #ruby
iliketur_ has joined #ruby
dkamioka has joined #ruby
apeiros has quit [Remote host closed the connection]
<bricker`work]>
Has anyone seen this error before? "JSON::GeneratorError: only generation of JSON objects or arrays allowed" - it's only happening when Travis CI or Circle CI run my tests... I can't reproduce it locally, even with the same patch version of Ruby (1.9.3-p448)
<havenwood>
Lewix: In this usage it splits the range out to array elements.
buibex has joined #ruby
<havenwood>
s/splits/explodes
jamesaanderson has joined #ruby
<maletor>
Array.new(5) { 'foo' }
<maletor>
That's nice
hadees has quit [Quit: hadees]
devoldmx has quit [Read error: Connection reset by peer]
Bry8Star{T2 has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 245 seconds]
<canton7>
Array.new(5, 'foo'), too. Every so subtly different
<canton7>
s/every/ever
c0rn has joined #ruby
snovak has quit [Remote host closed the connection]
devoldmx has joined #ruby
freerobby has quit [Quit: Leaving.]
snovak has joined #ruby
raul782_ has quit [Remote host closed the connection]
freerobby has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
jonkri has quit [Quit: jonkri]
Bry8Star{T2 has joined #ruby
mikepack has quit [Remote host closed the connection]
zigomir_ has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjbohn is now known as jjbohn|afk
iamjarvo_ has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
ahawkins has quit [Quit: leaving]
zigomir has quit [Ping timeout: 245 seconds]
jjbohn|afk is now known as jjbohn
chrisja has joined #ruby
splittingred has quit [Ping timeout: 240 seconds]
Elhu has joined #ruby
havenwood has quit [Remote host closed the connection]
jonkri has joined #ruby
havenwood has joined #ruby
SHyx0rmZ has joined #ruby
Naoe-Kanno has quit [Ping timeout: 245 seconds]
aeontech has quit [Quit: aeontech]
artm has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
maz-dev has quit [Remote host closed the connection]
ebobby has joined #ruby
S0da has quit [Remote host closed the connection]
alvaro_o has joined #ruby
ebobby has left #ruby [#ruby]
ianbrandt has joined #ruby
havenn has joined #ruby
sambao21 has joined #ruby
maz-dev has joined #ruby
artm has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
dankest has joined #ruby
Jake232 has joined #ruby
yacks has quit [Quit: Leaving]
weems has quit [Ping timeout: 264 seconds]
Fire-Dragon-DoL has joined #ruby
Ripp__ has quit [Quit: Ripp__]
mrsolo has quit [Quit: Leaving]
seich- has quit [Ping timeout: 240 seconds]
volty has joined #ruby
<volty>
hi, i'm using CGI just to generate html files, how can I avoid CGI, when run with this purpose (standalone script) reading standard input on CGI.new ?
<maletor>
Does ruby (maybe activesupport) support transform_selected already? https://gist.github.com/maletor/6357333 I am aware of slice in ActiveSupport, but how would you do transform_selected?
anonymu__ has joined #ruby
zeade has quit [Quit: Leaving.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anonymuse has quit [Read error: Connection reset by peer]
<Eiam>
NAME
<Eiam>
pbcopy, pbpaste - provide copying and pasting to the pasteboard (the Clipboard) from command line
waxjar has quit [Ping timeout: 256 seconds]
<Eiam>
yeah i love them, I used to have a helper for IRB that implemented pbcopy & pbpaste as functions
Guest53117 has quit [Ping timeout: 256 seconds]
devoldmx3 has joined #ruby
zeade has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tjbiddle has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
zarubin has quit [Ping timeout: 268 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
artm has joined #ruby
anonymus_ has quit [Ping timeout: 245 seconds]
agjacome has quit [Quit: leaving]
maz-dev has joined #ruby
agjacome has joined #ruby
kvirani has quit [Remote host closed the connection]
Davey has joined #ruby
kvirani has joined #ruby
maz-dev has quit [Remote host closed the connection]
_md has joined #ruby
graft has joined #ruby
graft has joined #ruby
Spami has joined #ruby
axeman- has quit [Remote host closed the connection]
Zeeraw has joined #ruby
vlad_starkov has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
jbomo has quit [Ping timeout: 245 seconds]
Coolhand has quit [Client Quit]
Coolhand has joined #ruby
Coolhand has quit [Read error: Connection reset by peer]
RichardBaker has quit [Quit: RichardBaker]
BizarreCake has quit [Ping timeout: 264 seconds]
emergion has quit [Ping timeout: 260 seconds]
mneorr has quit [Ping timeout: 264 seconds]
brennanMKE has joined #ruby
Coolhand has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
i_s has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
devoldmx3 has joined #ruby
jamesaanderson has joined #ruby
senayar_ has quit [Remote host closed the connection]
apeiros has joined #ruby
devoldmx27 has joined #ruby
devoldmx has quit [Read error: No route to host]
jhn has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
mansi has quit [Ping timeout: 245 seconds]
intuxicated has joined #ruby
devoldmx3 has quit [Ping timeout: 240 seconds]
ryandeussing has quit [Ping timeout: 264 seconds]
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
Elhu has joined #ruby
jamesaanderson has quit [Client Quit]
Heskie has joined #ruby
patrick85 has quit [Remote host closed the connection]
enaqx has quit [Ping timeout: 250 seconds]
vlad_starkov has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
ryandeussing has joined #ruby
splittingred has joined #ruby
iamjarvo has quit [Remote host closed the connection]
noopq has quit [Ping timeout: 276 seconds]
cha1tanya has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
jprovazn_afk has quit [Quit: Odcházím]
pothibo has quit [Quit: pothibo]
jsatk has joined #ruby
jsatk has quit [Remote host closed the connection]
Lewix_ is now known as Leewix
Leewix is now known as Lewix
Lewix has quit [Changing host]
Lewix has joined #ruby
Notte has joined #ruby
geekbri has quit [Remote host closed the connection]
brettnem has joined #ruby
jsatk has joined #ruby
iamjarvo_ has joined #ruby
rickmasta has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
iamjarvo has quit [Read error: Connection reset by peer]
JadedEvan has quit [Quit: This computer has gone to sleep]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has joined #ruby
vlad_starkov has joined #ruby
brettnem has quit [Client Quit]
ffranz has quit [Quit: Leaving]
decoponio has quit [Quit: Leaving...]
mansi has joined #ruby
ffranz has joined #ruby
seich- has joined #ruby
saarinen_ has joined #ruby
mansi_ has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
saarinen_ is now known as saarinen
JadedEvan has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Elhu has quit [Quit: Computer has gone to sleep.]
ffranz has quit [Client Quit]
mduarte has quit [Quit: Leaving...]
giarc has quit [Quit: Leaving.]
Astralum has joined #ruby
abstractj has joined #ruby
k611 has joined #ruby
Liquid-- has joined #ruby
devoldmx has joined #ruby
I-saac has joined #ruby
devoldmx27 has quit [Ping timeout: 245 seconds]
ferr has joined #ruby
<graft>
is there an easy way to turn on/off irb's inspection?
artm has joined #ruby
caju has quit [Ping timeout: 245 seconds]
<graft>
it gets annoying when you're dealing with, say, a huge nokogiri-parsed document
jsatk has quit [Remote host closed the connection]
Doc_X has quit [Remote host closed the connection]
caju has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
kidoz has joined #ruby
jsatk has joined #ruby
<hanmac>
graft you could add ;0 at the end of the line
<Morrolan>
Or use pry, and simply add a semicolon. :D
Mon_Ouie has quit [Ping timeout: 264 seconds]
mando has quit [Remote host closed the connection]
scriabin has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
<banister>
Morrolan +1 ;)
<scriabin>
if I have two versions listed in gem list, how do I tell ruby to use one version over another? i.e. I see jruby-openssl (0.8.8, 0.7.7) - how do I get ruby to use 0.7.7 ?
St_Marx has quit [Remote host closed the connection]
<banister>
scriabin use a Gemfile
artm has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
<banister>
and specify the version
<scriabin>
if not, it just takes the latest version?
<banister>
scriabin yes, pretty much
<scriabin>
I mean if the gem is not listed in my Gemfile
St_Marx has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
<banister>
if it's not listed in your Gemfile (and you do have a Gemfile) then it won't be able to use that gem at all
Spami has quit [Quit: This computer has gone to sleep]
<hanmac>
you can also use the "gem" command inside ruby
saarinen has quit [Quit: saarinen]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<scriabin>
ok cool
jamesaanderson has joined #ruby
<scriabin>
thanks guys - always helpful
robustus has joined #ruby
I-saac has quit [Ping timeout: 245 seconds]
browndawg has left #ruby [#ruby]
mary5030 has quit [Ping timeout: 245 seconds]
joonty_ has joined #ruby
ianbrandt_ has joined #ruby
joonty has quit [Read error: Operation timed out]
<[[thufir]]>
how do I install the ssh gem? I installed with sudo, but the user doesn't seem to have access to that? there are various gems I'll need to install with "gem install <some gem>" http://pastebin.com/ytw2i9Cw
yxhuvud has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fyz1x has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
vlad_starkov has quit [Write error: Connection reset by peer]
vlad_starkov has joined #ruby
blackmesa has joined #ruby
<fryguy>
[[thufir]]: show a log of installing it with sudo
JadedEvan has quit [Quit: This computer has gone to sleep]
ianbrandt has quit [Ping timeout: 264 seconds]
ianbrandt_ is now known as ianbrandt
yxhuvud2 has quit [Ping timeout: 260 seconds]
<Morrolan>
Installing gems with sudo? What's that, 2010? :P
mary5030 has joined #ruby
Senjai has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
<fryguy>
yah it's not great
relix has joined #ruby
futilegames has quit [Quit: futilegames]
iamjarvo has joined #ruby
<[[thufir]]>
fryguy: I'm currently removing ruby, I found rbenv which sounds like rvm without the compiling...
frozenfoxx has joined #ruby
<frozenfoxx>
Super quick syntax question
<frozenfoxx>
I want to assign a variable based upon a case/switch.
<Morrolan>
[[thufir]]: It's not.
<Morrolan>
Any ruby version manager will need to compile ruby if there's no binaries available.
<frozenfoxx>
Depending on an expression/other variable's value, I'd like to assign different values. Anyone got a quick link on where to find that?
<[[thufir]]>
ohhh
<Morrolan>
(Respectively, you'll have to compile it, if it's just a version manager, and not an installer)
<Morrolan>
But compiling Ruby should be pretty straight-forward. :)
<digital-ghost>
Why does one bomb and the other not?
freerobby has quit [Quit: Leaving.]
<pontiki>
but when you're assigning it to a single slot in a string, it's better to make sure you've only got a single character
<pontiki>
plain b is a local variable, which you probably don't have defined at that point.
crus has quit [Read error: Connection reset by peer]
dkamioka has quit [Read error: Connection reset by peer]
pierre1 has joined #ruby
<digital-ghost>
yeah, there's no plain b defined
<pontiki>
so ?b means the single character 'b' and b means the local variable named b
<digital-ghost>
So in that case, what does the "?" do
caju has quit [Remote host closed the connection]
<pontiki>
denotes the following item as a single character
<digital-ghost>
just saw that heh
<digital-ghost>
typed it into irb with .class
<digital-ghost>
one shows as a string
<digital-ghost>
So this was so difficult to google for some reason
<digital-ghost>
everything I kept hitting didn't help
Elhu has joined #ruby
<pontiki>
the "some reason" is because google tends to discard puncutation
<digital-ghost>
I still am trying to find out where ? is defined
<digital-ghost>
In this context
<digital-ghost>
I see it used for one line if statements, and things like ".blank?"
<pontiki>
it's part of ruby syntax
k612 has quit [Ping timeout: 245 seconds]
<pontiki>
ah, that is a different use
<pontiki>
there, the ? is part of the method name
<digital-ghost>
exactly, (am learning) so the problem is how I identify the different usages
<digital-ghost>
and where I can look them up to really understand their purposes
x1337807x has joined #ruby
Xaitec has joined #ruby
<digital-ghost>
right, only by convention right? (for the .blank?) it just makes it easier to read as a sentence would be.
<digital-ghost>
If I understand it correctly.
<digital-ghost>
I believe .blank works the same
codecop has quit [Remote host closed the connection]
virtualize has quit [Ping timeout: 260 seconds]
Heskie has quit []
Nanuq has joined #ruby
Vivekananda has joined #ruby
JDHankle has quit [Remote host closed the connection]
<apeiros>
no
<apeiros>
digital-ghost: .blank? is not syntax sugar. .blank and .blank? are two different methods
<apeiros>
they only work the same if somebody actually created an alias
superscott[8] has joined #ruby
ffranz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
akells has joined #ruby
<digital-ghost>
hmm.
devoldmx3 has joined #ruby
mansi has joined #ruby
asobrasil has left #ruby [#ruby]
slyv has joined #ruby
<digital-ghost>
I didn't know that .blank? is a rails extension
<digital-ghost>
That explains why it wasn't working in irb
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
reset has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
akells has quit [Ping timeout: 276 seconds]
S0da has joined #ruby
interactionjaxsn has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
freerobby has joined #ruby
zarubin has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
St_Marx has joined #ruby
nickbender has joined #ruby
reset has quit [Ping timeout: 256 seconds]
crus has joined #ruby
emergion has joined #ruby
parzo has quit [Ping timeout: 245 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
iliketur_ has joined #ruby
gyzmodo has quit [Ping timeout: 264 seconds]
jhn has quit [Ping timeout: 264 seconds]
Megtastique has quit [Quit: Megtastique]
sambao21 has joined #ruby
iamjarvo has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
rcosta has joined #ruby
iamjarvo has joined #ruby
c0rn has joined #ruby
cody-- has joined #ruby
s0ny123 has quit [Quit: Lost terminal]
elux has quit [Quit: Leaving...]
jerius has quit [Quit: jerius]
snovak has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
iamjarvo has quit [Ping timeout: 245 seconds]
Nanuq has quit [Ping timeout: 245 seconds]
jibi has quit [Quit: .]
wmoxam has quit [Ping timeout: 245 seconds]
cpruitt has joined #ruby
kpshek has quit []
baordog has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
cody-- has quit [Quit: Computer has gone to sleep.]
<cpruitt>
I'm having a heck of a time figuring out how to mock/stub a module method in an spec test. I'm using .stub(:method).and_return("val") but the original module method continues to be executed. Shouldn't my stub override it? https://gist.github.com/anonymous/e393e24f4af4379992b1
apeiros has quit [Remote host closed the connection]
JadedEvan has quit [Quit: This computer has gone to sleep]
apeiros has joined #ruby
mary5030 has quit [Remote host closed the connection]
yxhuvud has quit [Ping timeout: 245 seconds]
splittingred has quit [Ping timeout: 264 seconds]
splittingred has joined #ruby
jalcine has joined #ruby
devoldmx3 has quit [Ping timeout: 240 seconds]
Nanuq has joined #ruby
Yakko has joined #ruby
sergicles has quit [Quit: sergicles]
mmitchell has quit [Ping timeout: 245 seconds]
thesheff17 has quit [Ping timeout: 246 seconds]
sergicles has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
kpshek has joined #ruby
basex has joined #ruby
thebastl has quit [Remote host closed the connection]
rcosta has quit [Remote host closed the connection]
wmoxam has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
viszu has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
x1337807x has joined #ruby
havenwood has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
pentameter has quit [Read error: Connection reset by peer]
dankest has quit [Ping timeout: 245 seconds]
bluOxigen has quit [Ping timeout: 245 seconds]
jonkri has quit [Quit: jonkri]
JadedEvan has joined #ruby
snath has quit [Ping timeout: 240 seconds]
<Aloysius1>
cpruitt: I'm not sure you can layer like that.
mary5030 has quit [Remote host closed the connection]
iliketur_ has quit [Quit: zzzzz…..]
<Aloysius1>
cpruit: It wouldn't seem to make sense.
vlad_starkov has quit [Remote host closed the connection]
virt|a|work has quit [Ping timeout: 256 seconds]
staafl has quit [Read error: Connection reset by peer]
sergicles has quit [Quit: sergicles]
staafl has joined #ruby
virtualize has joined #ruby
virt|a has joined #ruby
caju has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
ebobby has joined #ruby
kpshek has quit []
rhys_ has quit [Quit: Leaving]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
starfox21 has quit [Quit: starfox21]
ebobby has left #ruby [#ruby]
JadedEvan has quit [Quit: This computer has gone to sleep]
ndrei has quit [Ping timeout: 248 seconds]
hashpuppy_ has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
snovak has joined #ruby
SteveBenner9 has joined #ruby
nari has joined #ruby
hasrb has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 276 seconds]
artm has joined #ruby
Quashie has quit [Quit: Leaving]
pvizcay has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
weems has quit [Ping timeout: 245 seconds]
zeade has quit [Quit: Leaving.]
anonymu__ has quit [Remote host closed the connection]
mlpinit has quit [Read error: Operation timed out]
Speed has joined #ruby
Guest69670 is now known as raar
raar has quit [Changing host]
raar has joined #ruby
bean has joined #ruby
rcosta has joined #ruby
kaspergrubbe has joined #ruby
mansi has quit [Remote host closed the connection]
MrThePlague has quit [Remote host closed the connection]
mansi has joined #ruby
atno is now known as atno|Zzz
Evixion has quit [Ping timeout: 264 seconds]
julian-delphiki has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
shunt has quit [Quit: leaving]
kaspergrubbe has quit [Ping timeout: 245 seconds]
cads has quit [Ping timeout: 245 seconds]
randomautomator has quit [Remote host closed the connection]
weems has joined #ruby
randomautomator has joined #ruby
covi has quit [Remote host closed the connection]
zarubin has quit [Ping timeout: 245 seconds]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
artm has quit [Ping timeout: 245 seconds]
jlast has quit [Remote host closed the connection]
randomautomator has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
_md has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fsck3r has quit [Quit: Leaving...]
x1337807x has joined #ruby
tomzx_mac has joined #ruby
JDHankle has joined #ruby
thesheff17 has joined #ruby
yxhuvud has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
VTLob has quit [Quit: VTLob]
JDHankle has quit [Ping timeout: 245 seconds]
nickbender has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
Tricon has joined #ruby
pel_daniel1 has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 256 seconds]
TheFuzzball has joined #ruby
Davey has joined #ruby
fsck3r has joined #ruby
havenwood has quit [Remote host closed the connection]
snovak has joined #ruby
hell_lord has joined #ruby
jbomo has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
agjacome has quit [Quit: leaving]
gstamp has joined #ruby
<hell_lord>
how is .descendants supposed to behave? is it expected that it returns empty until the sub classes have been instantiated once, or is this a quirk of working in an environment where the ruby is loading files on demand?
wmoxam has joined #ruby
dankest has joined #ruby
osvico has joined #ruby
rburton- has joined #ruby
graft has quit [Ping timeout: 245 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bklane has quit [Remote host closed the connection]
<[[thufir]]>
I can inspect the conn for the values: conn = YAML.load_file('conn.yml') but I want to assign them to values. host = conn[host] or something like that. what's the syntax please?
snath has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<hell_lord>
[[thufir]]: well, i'm a ruby noob, but that seems like a pretty ridiculously basic question. did you try conn[:host] ?
havenwood has joined #ruby
mneorr_ has quit [Remote host closed the connection]
<[[thufir]]>
hell_lord: no, I didn't know that was the syntax. t hanks.
<sam113101>
unless you do ":itthis: 'way'" you'll need to access them as strings
<sam113101>
I think
snovak has quit [Ping timeout: 246 seconds]
<sam113101>
conn['host']
ebouchut has joined #ruby
<[[thufir]]>
yeah, I was wondering about that. In the yaml, I had to put the host like 'foo.com' with quotes to get it to parse. also on the port number.
<hell_lord>
[[thufir]]: you should read about ruby hashes and symbols
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sam113101>
if you want to retrieve it as conn[:host] you'll need to write it as :host in your yaml file as well, if I'm not mistaken
<[[thufir]]>
h = conn['host'] works for getting the values.
<sam113101>
if you write host only it's going to be a string instead
Xaitec has quit [Read error: Connection reset by peer]
<sam113101>
(which might be what you want)(
<[[thufir]]>
in the yaml it's as so: port: '6789' and also with '' for the host. however, for user and password, it's just user: some_user without the single quote. I want to use the port and so forth to connect with ssh.
Fin1te has joined #ruby
<sam113101>
I wouldn't use the 's for the port, unless you want a string instead of an integer
ebouchut has quit [Quit: This computer has gone to sleep]
mengu_ has joined #ruby
Es0teric has joined #ruby
wems has joined #ruby
<[[thufir]]>
ok, well I don't know why I was using the single quotes. I removed them and it still runs, so that was a red herring.
mengu has quit [Ping timeout: 245 seconds]
<[[thufir]]>
I want pass them into something like this: Net::SSH.start('host', 'user', password => "pword") do |ssh|
Guedes has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
_Bravado_ has quit [Quit: _Bravado_]
<sam113101>
amazing
Guedes has left #ruby [#ruby]
tylersmith has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
nari has joined #ruby
havenwood has joined #ruby
Guest62936 has quit [Ping timeout: 264 seconds]
sergicles has joined #ruby
predator217 has joined #ruby
bio has joined #ruby
bio is now known as Guest8962
predator117 has quit [Ping timeout: 256 seconds]
sergicles has quit [Ping timeout: 245 seconds]
chrisja has quit [Quit: leaving]
<pontiki>
[[thufir]]: Net::SSH.new is kind of a hybrid. The username and host are required parameters, password and port are not. So as rubyists of old have often done, the first two parameters are given explicitly, while the optional ones are given in a Hash
kilophoton has quit [Ping timeout: 245 seconds]
bzitzow has joined #ruby
slabserif has joined #ruby
slabserif has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
cpruitt has quit [Quit: cpruitt]
sarkis has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
graft has joined #ruby
graft has joined #ruby
<[[thufir]]>
pontiki: thanks.
marr has quit [Ping timeout: 240 seconds]
sergicles has joined #ruby
pothibo has joined #ruby
<[[thufir]]>
actually, I think I want to use telnet, it's a MUD game server and It's giving errors of "Servname not supported for ai_socktype" which I take to mean that it doesn't like ssh connections (?).
BRMatt has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]