<Ox0dea>
flashpoint9: You misspelled the parameter in #initialize.
ensyde__ has joined #ruby
<flashpoint9>
Ox0dea: wow, thanks
<Ox0dea>
flashpoint9: Sure thing. It doesn't throw a NameError because the `attr_reader` has already defined a method called #chainring (which will return the value of @chainring, which will be `nil` at this point).
<Ox0dea>
So you were effectively saying `@chainring = nil`, and thus the NoMethodError.
marr has quit [Remote host closed the connection]
<flashpoint9>
thanks again
<Ox0dea>
No worries.
chipotle has joined #ruby
stannard has quit [Remote host closed the connection]
tristanp has quit [Remote host closed the connection]
<apeiros>
tribals: I did check. because NameError was unexpected. NoMethodError was expected.
ta_ has joined #ruby
mhoungbo has joined #ruby
<apeiros>
so please - don't do that. don't put random interpretations of errors in your descriptions. copy & paste the *precise* exception. otherwise you're just making it unnecessarily hard for people who want to help.
the_drow has quit [Quit: This computer has gone to sleep]
ocbtec has joined #ruby
<apeiros>
as for the reason: `spam = spam.swapcase` (line 4) does not call A#spam=, it assigns a value to a local variable.
<apeiros>
you want `self.spam = spam.swapcase`
nofxx has quit [Ping timeout: 244 seconds]
<tribals>
apeiros: ok. sorry again, i just typed it by hand, so the mistake leaked
<tribals>
apeiros: thanks
<tribals>
apeiros: any reasons why `something =` doesn't call accessor but assigns local variable?
<apeiros>
tribals: sure - you would not be able to assign to a local variable ever if it'd call the method
full_throttle has quit [Ping timeout: 248 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
or alternatively: assigning locals would mean you'd always have the overhead to go through the full method lookup including method_missing just to set an lvar (huge overhead)
<tribals>
apeiros: sure! why i don't thought about that? (rhetorical question)
<tribals>
apeiros: thanks!
<apeiros>
yw
ta_ has quit [Ping timeout: 248 seconds]
Tempesta has quit [Quit: AdiIRC is updating to v2.3 Beta Build (2016/04/09) 32 Bit]
nhhc has joined #ruby
Tempesta has joined #ruby
cwenner has joined #ruby
dangerousdave has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
rolha has joined #ruby
terlar has joined #ruby
mhoungbo has quit [Ping timeout: 264 seconds]
thisirs has joined #ruby
antgel has joined #ruby
nodejunkie has joined #ruby
moeabdol has joined #ruby
Softnex has joined #ruby
<Softnex>
hello, is there an official Ruby 1.9+ package for centos 6 ?
aqoom has joined #ruby
DoubleMalt has joined #ruby
krobzaur_ has joined #ruby
kareeoleez has quit [Remote host closed the connection]
Suntzu has quit [Read error: Connection reset by peer]
kareeoleez has joined #ruby
Snowy has joined #ruby
nhhc has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<Ox0dea>
I've run into a use case for default block arguments twice in as many days. Do you think that should be a thing?
nhhc has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
<Papierkorb>
Softnex: Don't know anything about CentOS, https://michaelheap.com/installing-ruby-1-9-3-on-centos-6/ talks about using the "software collections". Ruby1.9 is past its End Of Life, please check if either 1) your application(s) also work with recent rubies or 2) that CentOS still provides recent security patches
jero__ has quit [Ping timeout: 248 seconds]
<apeiros>
Ox0dea: blocks are arguments to me, and as such I find it sad that both, mandatory blocks, as well as block defaults are missing
<apeiros>
so yes, IMO default blocks should be a thing. just don't know how to do it well wrt syntax
jero__ has joined #ruby
<Softnex>
Papierkorb : thanks, in facte, centos 6 is still delivered with ruby 1.8... well, my application works with, at least, ruby 1.9 but I would be happy to have a more recent version
Begi has joined #ruby
tildes has quit [Ping timeout: 244 seconds]
<forcer>
Software collections are a pain to use, but work, if you're stuck in RHEL6/CentOS6
<Papierkorb>
Ox0dea: Or do you mean a default supplied block?
pawnbox has joined #ruby
darkxploit has quit [Quit: Leaving]
<Ox0dea>
Papierkorb: I'd like to not have to say `block ||= -> { ... }`, and it'd be nice if `yield` did The Right Thing as well.
alexherbo2 has joined #ruby
alexherbo2 has quit [Client Quit]
moeabdol has quit [Ping timeout: 244 seconds]
<Ox0dea>
`class PriorityQueue; def initialize &comparator = &:itself; end; end` would chuff me to bits.
duncannz has quit [Remote host closed the connection]
<Papierkorb>
First syntax idea would be def foo(..., &->{ the block})
<Ox0dea>
Where does the name go?
agit0 has joined #ruby
<Papierkorb>
Assuming I didn't create ambiguity: def foo(&block = &->{ ... }) So pretty much like any other default value
<Ox0dea>
Right, that's what I suggested minus the second (superfluous?) ampersand.
tildes has joined #ruby
<Papierkorb>
Thought about it, but it keeps it consistent to the without-name version, it also keeps it consistent with the existing syntax I'd say
merida has joined #ruby
darkxploit has joined #ruby
<darkxploit>
hello can someone explain me the difference between bundle install and gem install ?
SCHAAP137 has joined #ruby
duckpuppy has joined #ruby
<Papierkorb>
darkxploit: in short, bundle installs gems locally for a project (as defined in the Gemfile), gem install installs gems user oder system-wide. Also, gem install does not use a Gemfile
jdm has joined #ruby
skade has joined #ruby
<darkxploit>
Papierkorb, thank u
bruno- has joined #ruby
jgt4 has joined #ruby
Suntzu has joined #ruby
blackmesa has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
codecop has quit [Remote host closed the connection]
polysics has joined #ruby
__main__ has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr1 has joined #ruby
al2o3-cr1 is now known as al2o3-cr
__main__ has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
ramfjord has joined #ruby
merida has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 276 seconds]
GnuYawk has quit [Ping timeout: 248 seconds]
CausaMortis has joined #ruby
RyanMcCoskrie has quit [Quit: Konversation terminated!]
Chagel has joined #ruby
jgt4 has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
dmr8 has joined #ruby
b|ackwolf has quit [Ping timeout: 244 seconds]
CausaMortis has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
b|ackwolf has joined #ruby
bronson has joined #ruby
Lomex has joined #ruby
Nahra has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
youch has joined #ruby
codecop_ has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
GitGud is now known as sexytime
Nahra has joined #ruby
sandelius has joined #ruby
slacko30426 has quit [Quit: Leaving]
the_drow has joined #ruby
Nahra has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 268 seconds]
Nahra has joined #ruby
nodejunkie has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
minimalism has quit [Quit: minimalism]
CloCkWeRX has quit [Quit: Leaving.]
nhhc has quit [Ping timeout: 276 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atmosx has quit [Quit: rage rage against the dying of the light...]
bkxd has quit [Ping timeout: 260 seconds]
atmosx has joined #ruby
iNeedHelp has quit [Ping timeout: 276 seconds]
UserInNeed has joined #ruby
akkmaxon has joined #ruby
youch has quit [Ping timeout: 244 seconds]
agit0 has quit [Quit: zzzZZZ….]
yfeldblum has joined #ruby
<lxsameer>
any book recommendation for CRuby development ?
<Ox0dea>
lxsameer: There's the original one written for Ruby 1.6, but I'm blanking on the name and it's only been partially translated into English.
skade has joined #ruby
mrmortondk has joined #ruby
<lxsameer>
Ox0dea: so not useful,
jdm has quit [Ping timeout: 244 seconds]
<Ox0dea>
lxsameer: Are you scratching an itch, or?
<lxsameer>
Ox0dea: I'm really interested in Cruby development and specially byte code process
PedramT has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<Papierkorb>
lxsameer: Virtual machines in general for that, or Ruby in particular?
BTRE has quit [Ping timeout: 244 seconds]
<lxsameer>
Papierkorb: ruby , but I'm ready to read anything necessary
<Papierkorb>
lxsameer: I think the stuff for Lua has some documentation too if you're interested in general. Has nothing to do with Ruby though
<Papierkorb>
Most likely some (all?) ideas are similar/same, but I never looked at how Ruby does that
PedramT has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
<lxsameer>
Lua ? for real ?
<Papierkorb>
It has a robust VM too
<forcer>
And the work on luajit is excellent as far as I heard.
ur5us has quit [Ping timeout: 260 seconds]
<Papierkorb>
forcer: Only integrated LuaJIT, but from what I've seen it really is excellent.
<lxsameer>
interesting, It didn't know, I always thought lua is a weak designed lang
<Papierkorb>
Oh absolutely not. It focuses on what it's built for.
diegoaguilar has joined #ruby
Meow-J has joined #ruby
jdm_ has quit [Ping timeout: 244 seconds]
<lxsameer>
cool, I have to check it out too
skade has quit [Quit: Computer has gone to sleep.]
merida has joined #ruby
kadoppe has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
skade has joined #ruby
jdm has joined #ruby
merida has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 260 seconds]
cpup has quit [Ping timeout: 248 seconds]
agit0 has joined #ruby
snoobydoo has quit [Ping timeout: 244 seconds]
ur5us has joined #ruby
GnuYawk has joined #ruby
cpup has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
snoobydoo has joined #ruby
bluOxigen has joined #ruby
noop has joined #ruby
noop has quit [Client Quit]
aqoom has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 244 seconds]
aqoom has joined #ruby
bluOxigen has quit []
aqoom has quit [Client Quit]
xcesariox has joined #ruby
Coldblackice_ has quit [Ping timeout: 244 seconds]
Coldblackice_ has joined #ruby
merida has joined #ruby
merida has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 248 seconds]
sexytime is now known as TheGreatGudsby
agit0 has quit [Quit: zzzZZZ….]
moeabdol has joined #ruby
TheGreatGudsby has quit [Quit: bye habibis]
sdothum has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
TheGreatGudsby has joined #ruby
TheGreatGudsby has quit [Remote host closed the connection]
TheGreatGudsby has joined #ruby
Snowy has quit [Remote host closed the connection]
Semtex-H has joined #ruby
FooMunki has joined #ruby
<n1colas>
Hello!
jdm_ has joined #ruby
TheGreatGudsby is now known as GitGud
duckpuppy has joined #ruby
merida has joined #ruby
dionysus69 has joined #ruby
jdm has quit [Ping timeout: 244 seconds]
stannard has joined #ruby
valetudo has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
hanmac has quit [Ping timeout: 268 seconds]
<fnux>
n1colas: Hi!
moeabdol has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
mikecmpbll has joined #ruby
merida has quit [Remote host closed the connection]
jdm has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
jdm_ has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Gasher has joined #ruby
synaps3 has joined #ruby
vdamewood has quit [Quit: Life beckons.]
hanmac has joined #ruby
agit0 has joined #ruby
krz has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
bmf has quit [Ping timeout: 268 seconds]
karapetyan has joined #ruby
bkxd has joined #ruby
skade has joined #ruby
kadoppe has joined #ruby
stannard has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
Suntzu has quit [Read error: Connection reset by peer]
sandelius has joined #ruby
<synaps3>
hello, i want to do some pos tagging in ruby, i am currently using engtagger gem to tag the words, it returns xml-like output that i try to parse with nokogiri but somehow it wont work
<synaps3>
it just takes the first tag, like there are no other ones
blackmes1 has joined #ruby
<synaps3>
can someone help me solve it ?
araujo has quit [Quit: Leaving]
noServic1 has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 248 seconds]
tvw has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 252 seconds]
kadoppe has quit [Ping timeout: 260 seconds]
RegulationD has joined #ruby
SolarSailor has quit [Ping timeout: 264 seconds]
skade has joined #ruby
akkmaxon has quit [Ping timeout: 260 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
GitGud has quit [Quit: You my last first kiss, from now on I made you my only <3]
<jhass>
synaps3: so you try to parse it as XML, first of all it's not a valid XML document as it's missing the XML header, but nokogiri does its best and ignores that. Next XML can have only a single node at the toplevel, so Nokogiri takes the first one it finds
tildes has joined #ruby
<jhass>
if you try to parse it as HTML you get closer to what you want
TheGreatGudsby has joined #ruby
<darkxploit>
im trying to build something on a labo machine which i have already installed nginx, postgresql, RVM. Ruby and also did a gem install puma. My aim is to use Capistrano to deploy an app to the Puma server. Do u have an idea where do i start as from this point.
<jhass>
synaps3: though are you sure it's the primary/only interface to the library? because it would suck as an output format
krobzaur_ has quit [Ping timeout: 244 seconds]
<jhass>
synaps3: looks like the tagger instance has helper methods to retrieve stuff from the tagged string, still crappy interface but better than abusing nokogiri for it
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nfk has joined #ruby
lxsameer has quit [Quit: WeeChat 1.4]
<synaps3>
hmm i cant find some good docs about that gem
skade has quit [Quit: Computer has gone to sleep.]
<jhass>
synaps3: getting pry to play around is always a good idea too
<jhass>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<synaps3>
stuff like get_propper_nouns
Xeago has quit [Remote host closed the connection]
xcesariox has joined #ruby
matp has joined #ruby
<synaps3>
i need tag for every word, and as far as i can see add_tags method tags whole text and gets back xml-like stuff, i just want to iterate over every word and write its tag as simple as that
<synaps3>
oh thanks for pry jhass, will definetly look into it
cdg has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
triangles has joined #ruby
Jardayn has joined #ruby
sonOfRa has left #ruby ["Leaving"]
last_staff has quit [Ping timeout: 244 seconds]
<synaps3>
how do i put newline when i write to file
<al2o3-cr>
synaps3: use file.write('<?xml version="1.0"?>\n') or puts like suggested
<al2o3-cr>
double quotes sorry
<synaps3>
thanks
<jhass>
synaps3: also always use File.open with a block or convenience methods like File.write, File.read etc., so you don't forget to close your files
safe has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 246 seconds]
aqoom has joined #ruby
<synaps3>
sure
the_drow has joined #ruby
karapetyan has quit [Remote host closed the connection]
Lomex has quit [Remote host closed the connection]
Snowy has joined #ruby
Lycaonian has joined #ruby
madgen has joined #ruby
A124 has quit [Ping timeout: 276 seconds]
hinbody has quit [Quit: leaving]
darkf has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 248 seconds]
quakephil_ has joined #ruby
quakephil has quit [Ping timeout: 268 seconds]
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
william3 has joined #ruby
matp has joined #ruby
stannard has joined #ruby
edwinvdgraaf has joined #ruby
Dry_Lips has joined #ruby
triangles has quit [Read error: Connection reset by peer]
GnuYawk` has joined #ruby
GnuYawk has quit [Ping timeout: 252 seconds]
darkxploit has quit [Ping timeout: 252 seconds]
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
<Dry_Lips>
Hi everyone… I’m new to programming, and I’m trying to figure out if Ruby is suitable for my project. (I’m attempting to create a simple cross platform, desktop program with a GUI.)
stannard has quit [Remote host closed the connection]
quakephil_ has quit [Ping timeout: 240 seconds]
<Dry_Lips>
Is it for instance true that QtRuby is wxRuby is dead? Is shoes the only graphical toolkit still alive?
<Dry_Lips>
*and wxRuby
<Dry_Lips>
Or could I just save myself a lot of hassle by choosing another language?
<jhass>
going cross platform when new to programming is quite a project ;)
<jhass>
especially cross platform GUI
<Dry_Lips>
Haha, well, you're probably right... But I have an idea for a project, which is what drives me here :)
blackmes1 has quit [Ping timeout: 244 seconds]
<Dry_Lips>
And another concern is to find a language that I can stick with in the future
<Dry_Lips>
I'm won't ever be a professional programmer, so I'd like to learn something that won't limit my options later on
<jhass>
one possibly easier vector is JRuby/Swing the other is doing something web based (so HTML/CSS/JS, possibly a backend in Ruby), former is fairly hard to deploy for your users, latter is fairly hard to deploy for you
<Dry_Lips>
Right...
<jhass>
learning a language is one thing, learning programming another, once you're decent enough at the latter, picking up a new language isn't that much of an issue
<Dry_Lips>
I guess that's true
<jhass>
maybe tell some more about your project, might give some tips on how others would approach it
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tildes has quit [Remote host closed the connection]
<Dry_Lips>
I kind of like Ruby as a language, from what I've already seen... But I also want to be realistic... Perhaps Ruby isn't what I should focus on
<shevy>
not sure about the "password protection" part
the_drow has quit [Read error: Connection reset by peer]
shmoon_ has left #ruby [#ruby]
the_drow has joined #ruby
mkl is now known as mark2
the_drow has quit [Client Quit]
nettoweb has quit [Client Quit]
<shevy>
tk also works, it's very ugly though :D
<jhass>
Dry_Lips: so basically need a single button and a text box?
<Dry_Lips>
shevy: The idea is that the user has to set a password for accessing the app... For a program that blocks content, that is kind of crucial...
cashnguns has joined #ruby
cashnguns has quit [Max SendQ exceeded]
diegoaguilar has quit [Ping timeout: 244 seconds]
<Dry_Lips>
jhass: Nah, probably more advanced that that... ;) I want to include some options later on... (For blocking additional content)
cashnguns has joined #ruby
<Dry_Lips>
But I guess it's not super advanced
edwinvdgraaf has quit [Remote host closed the connection]
<jhass>
So, let's be honest, I doubt you'll succeed with the first attempt and a too big project will be overwhelming in the process of learning programming. My advice is to scale down your problem a lot, like start of with a script that works on linux, downloads the entries and adds them to /etc/hosts unless already present, then write another script that removes them again, then one that updates them, then merge them
<jhass>
all into one script that takes parameters
blaxter has joined #ruby
<jhass>
that limits the amount of technologies you need to take care of and you'll probably redo all this in any case since it's unlikely you'll make the best picks from the start
<Dry_Lips>
that sounds reasonable
<jhass>
so it'll also make it fairly irrelevant what you pick as a language for that first version
blaxter has quit [Client Quit]
blaxter has joined #ruby
<Dry_Lips>
Yeah... Since it's a learning process I have to take things step by step... I understand that...
jhack has joined #ruby
blaxter has quit [Client Quit]
<jhass>
exactly, once you have a better grip on one part you can look into adding another, like adding another platform, or a simple gui instead of command line parameters etc
blaxter has joined #ruby
<jhass>
it'll give you base to also experiment with different technologies for each and so on
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Dry_Lips>
Sounds very reasonable :)
symm- has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
A124 has joined #ruby
<Dry_Lips>
Anyways, thanks a lot guys... I'll start working on my script in Ruby, and then I guess that I'll get a feel after a while what I can do and what I cannot do with Ruby
blaxter has quit [Client Quit]
blaxter has joined #ruby
PedramT has joined #ruby
edwinvdgraaf has joined #ruby
diegoaguilar has joined #ruby
PedramT has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 252 seconds]
blaxter has quit [Client Quit]
ocbtec has quit [Remote host closed the connection]
blaxter has joined #ruby
PedramT has joined #ruby
ocbtec has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
blaxter has quit [Client Quit]
Snowy has quit [Remote host closed the connection]
the_drow has joined #ruby
_stu_ has joined #ruby
TheGreatGudsby is now known as GG
Emmanuel_Chanel has joined #ruby
icey has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
hinbody has joined #ruby
blaxter has joined #ruby
sandelius has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
shazaum_ has joined #ruby
<synaps3>
ok how do I delete stuff in string that I found with regex
<Zarthus>
what language?
<Zarthus>
oh
<synaps3>
lol
<Zarthus>
I'm totally not in a different channel.
Snowy has joined #ruby
<Zarthus>
you probably want String#gsub
jhack has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<synaps3>
yup, thanks :D
SCHAAP137 has joined #ruby
rubie has joined #ruby
Semtex-H has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
aqoom has left #ruby ["WeeChat 1.3"]
Azure has joined #ruby
bronson has joined #ruby
Snowy has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
b|ackwolf has quit [Ping timeout: 252 seconds]
Snowy has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
b|ackwolf has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jdeen>
Hi guys. I got a module which has few mehods `include`d in a class. Those methods need access some constants defined in the class. Is it possible. ex: `module A; def print; puts ABC; end; end` `class B; include A; ABC=10; end` `B.new.print` => ABC not defined
bmf has joined #ruby
<jdeen>
What i am trying to o is to seperate some common methods to use in few classes
b|ackwolf has quit [Ping timeout: 264 seconds]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
<jdeen>
but unfortunately some methods need to access some constant values defined in the calss that includes it
the_drow has quit [Quit: This computer has gone to sleep]
x0f has quit [Ping timeout: 260 seconds]
krobzaur_ has quit [Ping timeout: 250 seconds]
minimalism has joined #ruby
houhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<superfox_il_volp>
hey, how do we raise an exception that takes multiple arguments. For instance, given something like class MyCustomException < RuntimeError; def initialize(message, type); ... end; end. What's the proper syntax for `raise', something like raise MyCustomException.new("my message", "my type") ?
_blizzy_ has joined #ruby
jdm has quit [Ping timeout: 244 seconds]
tristanp has joined #ruby
<tobiasvl>
superfox_il_volp: yes
blaxter has joined #ruby
goglosh has joined #ruby
<tobiasvl>
superfox_il_volp: but look into RuntimeError's initialize method, it takes some optional arguments in addition to just the message
Suntzu has quit [Read error: Connection reset by peer]
<tobiasvl>
you might want to call super() with those maybe. not sure
jdm has joined #ruby
<hanmac>
kiba your code did work for me, but i did use "rb_funcall(rb_cObject"
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
william3 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jdm has quit [Ping timeout: 244 seconds]
Blaguvest has quit [Ping timeout: 268 seconds]
nobitanobi has joined #ruby
fedexo has joined #ruby
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
stupidystupid has joined #ruby
stupidystupid has quit [Max SendQ exceeded]
sauvin has quit [Read error: Connection reset by peer]
flopsec has joined #ruby
stupidystupid has joined #ruby
jdm has joined #ruby
jdm has quit [Remote host closed the connection]
stupidystupid has quit [Max SendQ exceeded]
tristanp has quit [Remote host closed the connection]
alxgsv has joined #ruby
dhinojosa has joined #ruby
ctrlrsf has joined #ruby
<klka>
hanmac, have any idea what might be the problem if it works for you but it doesnt for me?
stupidystupid has joined #ruby
<stupidystupid>
hello
goglosh has quit [Quit: leaving]
duckpuppy has joined #ruby
flashpoi_ has quit [Remote host closed the connection]
blackmes1 has joined #ruby
djbkd_ has quit [Quit: Leaving...]
Rodya_ has quit [Remote host closed the connection]
Lomex has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
twistedpixels has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
smathy has joined #ruby
Brackson has joined #ruby
<stupidystupid>
thanks tobiasvl. i read those but i don't understand it. for instance when i write exists?(my_file), i get the error undefined local variable.
<tobiasvl>
stupidystupid: ooookay, is my_file a variable you have defined? seems like maybe you're doing an elementary mistake somewhere which is not related to reading a file
nobitanobi has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 264 seconds]
<jhass>
felipec: mmh, it seems to do something when I set LC_ALL to different values at least
Yzguy has joined #ruby
<tobiasvl>
stupidystupid: you probably want File.exists? though
flashpoint9 has joined #ruby
<felipec>
jhass: I said LANG, not LC_ALL
<stupidystupid>
tobiasvl im a beginner so i dont really know what im doing
Es0teric has quit [Quit: Computer has gone to sleep.]
<jhass>
felipec: the question isn't what it should do in your dream world, but what it does do. And that's what we should figure out
<felipec>
jhass: No
<jhass>
then have fun without me
<stupidystupid>
thank you smathy. i have read many of those things, though i didnt understand all of what i read.
<Brackson>
How can I use IO.popen to open a script in the background? The script connects to an IRC server, and I want to make sure that it successfully connected before continuing in my main script. The second script writes "connected" when it successfully connects.
jottr has quit [Quit: WeeChat 1.4]
twistedpixels has joined #ruby
twistedpixels has quit [Excess Flood]
<stupidystupid>
tobiasvl i do not have a variable called my_file, should i add my file to a variable first?
twistedpixels has joined #ruby
<smathy>
stupidystupid, did you read Learn To Program? It's hard for me to imagine anyone reading that, and doing all the exercises, and still not knowing how to do the task you're asking about.
jdm_ has quit [Remote host closed the connection]
<tobiasvl>
stupidystupid: I think you should at least learn enough ruby to know what a variable is before you start file IO operations
<stupidystupid>
i know what variables are.
codecop has joined #ruby
<tobiasvl>
stupidystupid: then how come you're trying to call "exists?(my_file)" but don't have a variable called my_file?
<felipec>
jhass: LANG=C ruby -e 'p Encoding.default_external' works fine, actually
jdm_ has joined #ruby
Gasher has joined #ruby
<stupidystupid>
i didn't know i had to add the file to the variable.
<tobiasvl>
exactly
<stupidystupid>
so i am trying to assign the file to a variable now, but it is still throwing the same error
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Zzz...]
<smathy>
stupidystupid, learn ruby.
<stupidystupid>
i did learn it
<stupidystupid>
the syntax
freerobby has quit [Read error: Connection reset by peer]
<stupidystupid>
to do basic functions
<jhass>
which tutorial did you follow?
freerobby has joined #ruby
<stupidystupid>
i did all of the tutorials in codeschool and codecademy
<jhass>
and you still don't know strings? mh
<stupidystupid>
i know about strings
<jhass>
well, above hints otherwise :)
<stupidystupid>
is the file a string?
<tobiasvl>
the file is not a string. the fileNAME is.
<jhass>
vague but yes, the filename is a string and the file content is a string too
<jhass>
when you have it in your ruby program that is
rubie has quit [Remote host closed the connection]
<tobiasvl>
OK, the file content is a string too, that's true. but earlier I linked to documentation on the File object. you even tried to call the exists? method in File. where is the File object in your code example here?
<stupidystupid>
but now it things myfile is just a string
Yzguy has joined #ruby
Brackson has quit [Quit: Leaving]
<jhass>
yes
<tobiasvl>
it IS just a string
<stupidystupid>
so it's printing the string instead of the contents of the file
cpup has quit [Ping timeout: 248 seconds]
<jhass>
sure, you never read it
<smathy>
stupidystupid, that you think `myfile = hello.txt` is valid ruby (assuming hello isn't an instance of a class with a txt method) means that you DIDN'T learn the syntax.
<hanmac>
klka: i did use "gcc func.c -o func `pkg-config --cflags --static ruby-2.2` -lruby-2.2-static -lpthread -lgmp -ldl -lcrypt -lm" and that did allow static linking for me and it did work for me
<tobiasvl>
stupidystupid: I linked you to the File documentation earlier. did you look at it at all?
<stupidystupid>
smathy i don't think it's valid, but i'm just doing what i was instructed
bronson has quit [Ping timeout: 252 seconds]
<tobiasvl>
where did you get instructed to do this?
BTRE has quit [Quit: Leaving]
<stupidystupid>
tobiasvl yes i did read it, but i dont understand it.
<tobiasvl>
evidently
<stupidystupid>
tobiasvl jhass said that i should declare the file as a variable
cpup has joined #ruby
<smathy>
stupidystupid, that you think you were instructed to do that is a problem, you don't know enough yet to understand simple instructions.
<tobiasvl>
stupidystupid: ok, maybe you know what a string is, but you clearly don't know what puts is
<choke>
documentation, what's that?
<havenwood>
stupidystupid: It's worthwhile to learn how to read the Ruby documentation. It may seem cryptic at first but once you get the hang of it it's really helpful.
<havenwood>
stupidystupid: From the command line you can: ri File
<stupidystupid>
puts is put string. it prints the contents of a string to some kind of output. if used in irb it will print to the console. i dont know if it can be rerouted to a different output.
davedev2_ has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
<stupidystupid>
thats what i understand of puts
blaxter has joined #ruby
BTRE has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
<havenwood>
stupidystupid: Or just type `ri` and you'll get into the interactive mode. From there you can type `open` or `file` and explore various classes and modules
gxml has joined #ruby
Cohedrin has joined #ruby
<stupidystupid>
havenwood thank you. i like the ruby documentation. it tends to have useful examples. i just dont understand it insofar as file handling is concerned
<tobiasvl>
stupidystupid: OK, so why were you confused that puts-ing a string containing a filename just wrote the filename to console, and not the contents of a file with that filename?
<stupidystupid>
havenwood yes i have read it, but i do not understand it.
gxml has quit [Remote host closed the connection]
gxmlJP has quit [Quit: Leaving]
troulouliou_div2 has joined #ruby
<stupidystupid>
tobiasvl i wasnt confused about that. it did what i expected it would do. but i was trying to illustrate that i don't understand the instructions being given to me.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<havenwood>
Or maybe you didn't read the articles, just did the excercises?
<choke>
read? blasphemy!
<stupidystupid>
havenwood that codecademy article did not exist at the time when i did it, which was three years ago.
<tobiasvl>
aha, three years ago
<tobiasvl>
relevant information
<havenwood>
stupidystupid: It'd probably be worth brushing up.
baweaver has quit [Ping timeout: 250 seconds]
<stupidystupid>
brushing up on what?
<havenwood>
Ruby
n008f4g_ has quit [Ping timeout: 250 seconds]
<stupidystupid>
ive been doing it for three years
<choke>
so the fact that you've been doing it, means you don't have to brush up and continue to learn?
<tobiasvl>
stupidystupid: have you been doing it continuously for three years, or did you do some exercises three years ago and then didn't touch ruby again until today?
sdothum has joined #ruby
<havenwood>
stupidystupid: In any case, there's a File class. Underlying it is an IO class. It'd be worth searching online for a some reading related to those.
<stupidystupid>
ive been doing little coding puzzles for three years, like the ones that i just posted
flashpoint9 has quit [Remote host closed the connection]
<stupidystupid>
i have tons of them all saved on my computer
flashpoint9 has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
<havenwood>
stupidystupid: Learning to use the docs is worth your time. I'd suggest studying the Ruby core and stdlib documentation closely.
flashpoint9 has quit [Remote host closed the connection]
_stu_ has joined #ruby
<stupidystupid>
i use the docs to find cool methods
<stupidystupid>
thats how i learned about gsub and slice
<stupidystupid>
i was hoping that if i just kept doing little puzzles, i would eventually understand how to make a program
darkxploit has quit [Quit: Leaving]
<havenwood>
stupidystupid: now you just need to learn more cool methods, like read and write
<stupidystupid>
like for instance i have a spreadsheet that needed to be parsed
MagePsycho has joined #ruby
<stupidystupid>
and i could do it really easily in ruby
<stupidystupid>
it would be so trivial
<stupidystupid>
but i didnt know how to get it into ruby
<stupidystupid>
so i had to write it into the spreadsheet cell
<stupidystupid>
and it looks terrible
<stupidystupid>
let me show you guys
<stupidystupid>
you'll cry probably
<choke>
we're already crying.. 3 years and still "cant make a program"
pawnbox has quit [Remote host closed the connection]
aguabendilo has joined #ruby
<aguabendilo>
._.
pawnbox has joined #ruby
davedev2_ has quit [Ping timeout: 248 seconds]
<aguabendilo>
._.t
<aguabendilo>
t._.
<jhass>
aguabendilo: can we help you?
aguabendilo has quit [Quit: • IRcap • 8.72 •]
helpa has quit [Remote host closed the connection]
<quakephil>
@_@
helpa has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
<forcer>
They were on another channel spamming just moments ago. So I guess "no".
davedev24 has joined #ruby
johnmilton has quit [Ping timeout: 250 seconds]
<MagePsycho>
how to install gem?
<MagePsycho>
it’s there by default when we install ruby?
<jhass>
yes
SCHAAP137 has quit [Ping timeout: 276 seconds]
<havenwood>
MagePsycho: RubyGems ships with Ruby. The `gem` command will be there.
houhoulis has quit []
<MagePsycho>
havenwood: cool man
<MagePsycho>
I am from PHP background and ruby is on next level
<MagePsycho>
very good
QORRiE has joined #ruby
<havenwood>
MagePsycho: (It wasn't the case with Ruby 1.8, which is past End-of-Life.)
<MagePsycho>
can you guys suggest me what are the best things that we can do with ruby?
<havenwood>
MagePsycho: Use Ruby 2.2.4 or 2.3.0!
<MagePsycho>
using .2.3.0 for now
dvinciguerra_ has quit [Ping timeout: 260 seconds]
<choke>
Welcome to the fold MagePsycho, I myself made the switch from a 18 year PHP career to Ruby a year ago
<MagePsycho>
choke: wow.. that sounds interesting
<MagePsycho>
choke: tell me from what should i start with
davedev2_ has joined #ruby
spider-mario has joined #ruby
<havenwood>
MagePsycho: Make a Rack app and run it with `rackup`: http://rack.github.io
<choke>
Right here is a good spot, the guys in this channel really helped me get started ( same with the Rails channel )... Always real helpful when I can articulate a proper question...
<droptone>
Question: If I have a returned file path like "/web/tfcv3/public/assets/artist_profiles/9/original/And_So_The_Story_Goes_-_3_PM.mp3" and I want to trim the string so that it eliminates the path up to /assets, what's the best way to edit the string?
<smathy>
droptone, regex
colegatron has quit [Ping timeout: 268 seconds]
<droptone>
Ok, if the path is always prefixed by /web/tfcv3/public, what would the regex string look like to eliminate?
<droptone>
In the past I would use .split("/").whatever but I'm not sure if that's optimal
<smathy>
droptone, well if it's always the same string then you can just use slice.
<droptone>
hmm, ok
SCHAAP137 has joined #ruby
johnmilton has joined #ruby
jdeen has quit [Ping timeout: 244 seconds]
<havenwood>
droptone: What are you trying to get at? Each part? Just the last? First and last?
<droptone>
The entire string beginning with /assets...
<droptone>
eliminate /web/tfcv3/public
<smathy>
droptone, so either `prefix = "/web/tfcv3/public"; path[prefix.length..-1]`
weemsledeux has joined #ruby
<droptone>
hmm, ok
<smathy>
droptone, or if you don't know what could be before `/assets` then: path.sub /#{prefix}/, ''
<droptone>
Naah, the data before /assets is consistent.
<smathy>
Ok, so just the slice then.
<droptone>
That path[prefix.length..-1] did it
<droptone>
Thank you, great stuff.
<smathy>
Np.
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nobitanobi has joined #ruby
krz has quit [Read error: Connection reset by peer]
hexagoxel has joined #ruby
Brackson has joined #ruby
<hexagoxel>
hi. what is the/a "local repository", as seen in `gem help install`?
<Brackson>
How do I write a script that starts a Sinatra server and connects to an IRC server in the background?
<hexagoxel>
links to the appropriate section in any manual appreciated, too.
BTRE has quit [Ping timeout: 244 seconds]
dangerousdave has joined #ruby
duckpuppy has joined #ruby
ctarx has joined #ruby
pawnbox has joined #ruby
<Brackson>
I'm writing a script that has one main console window. It connects to an IRC channel and logs the chats, as well as opens a Sinatra server to interact with the data. Is there any way that I can write the master script to start both services in the background and check for any errors?
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
Rodya_ has quit [Quit: Leaving...]
dangerousdave has quit [Client Quit]
Devalo has joined #ruby
rolha has quit [Ping timeout: 246 seconds]
duckpuppy has quit [Ping timeout: 244 seconds]
<smathy>
hexagoxel, that's just the place on your local hard drive where the code for a gem will be put, and hence can later be loaded into a running ruby program/process. More info: http://guides.rubygems.org/command-reference/
rolha has joined #ruby
bmf has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
QORRiE has quit [Read error: Connection reset by peer]
blandflakes has joined #ruby
Devalo has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
chipotle has quit [Max SendQ exceeded]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
Yzguy has quit [Quit: Cya]
snoobydo1 has quit [Ping timeout: 276 seconds]
jhack has quit [Quit: jhack]
ur5us has joined #ruby
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<hexagoxel>
what is the default local repository directory?
last_staff has quit [Quit: last_staff]
<hexagoxel>
smathy: maybe i am blind, but does the reference actually contain any information in this direction?
<hexagoxel>
"RubyGems’ default local repository can be overridden with the GEM_PATH and GEM_HOME environment variables."
<hexagoxel>
so i guess there is some default..
<cippaciong>
hexagoxel: I think the default depends on your OS
MagePsycho has quit [Quit: MagePsycho]
<Brackson>
can anyone help with my issue above?
ta_ has joined #ruby
<smathy>
...and your ruby, that same line you're quoting appears in the second on the command you can use to see the installation directory.
nobitanobi has quit [Remote host closed the connection]
dirpirin has quit [Client Quit]
Lomex has quit [Remote host closed the connection]
niftylettuce has quit [Quit: Connection closed for inactivity]
Xeago has joined #ruby
Es0teric has joined #ruby
Cohedrin_ has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
karapetyan has joined #ruby
tvon has joined #ruby
Es0teric has quit [Client Quit]
diegoaguilar has quit [Ping timeout: 260 seconds]
Total_Meltdown has joined #ruby
Cohedrin has quit [Ping timeout: 260 seconds]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
nobitanobi has joined #ruby
chouhoulis has joined #ruby
A5101 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<smathy>
brackson, there are many ways, shared variables, Queues, ConditionVariable, but if you have one thread blocking until another has done something, you might ask why you want to have that other thread in the first place?
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
diegoaguilar has joined #ruby
<Brackson>
smathy: the master script starts an IRC connection in the background and logs chats, and also starts Sinatra in the background to interact with the data. I can't really think of another way to accomplish that than having separate threads.
<Brackson>
the master script also outputs certain data not really related to those two things.
william3 has quit [Remote host closed the connection]
<Total_Meltdown>
Does anyone know of a good way of supporting plugins in a CLI gem without requiring the user to run it with "bundle exec" all the time?
<Total_Meltdown>
I have a tool (https://github.com/seanedwards/cfer) that provides a DSL that a user writes in their own ruby script, and I'd like their scripts to be able to require gems they specified in their gemfile, but I have to run "bundle exec cfer my_script.rb" for that to work. I'm wondering if there's a way for Cfer to use Bundler to read the Gemfile and update LOAD_PATH for you in some way.
avenj has quit [Read error: Connection reset by peer]
rehat has joined #ruby
BTRE has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhack has joined #ruby
Es0teric has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nobitanobi has quit [Remote host closed the connection]
tribals has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
nettoweb has joined #ruby
dmr8 has quit [Quit: Leaving]
decoponyo has quit [Quit: Leaving...]
codecop has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 260 seconds]
ctarx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
johnbat26 has quit [Ping timeout: 252 seconds]
<Brackson>
darix: I'm trying to run sinatra in the background of my script to a GUI for controlling it.
chouhoulis has joined #ruby
<Brackson>
the rest of the script isn't sinatra/server related
<darix>
fork
Xeago has quit [Remote host closed the connection]
Asher has joined #ruby
mustmodify has joined #ruby
Xeago has joined #ruby
kadoppe has joined #ruby
GodFather has joined #ruby
<mustmodify>
so I have two kinds of matching going on... we match on one level using certain criteria and if a match is found, we match against its children using a different criteria. I'm seriously considering naming both methods 'match'... can't think of a reason not to do it. But it feels a bit weird. Is this going to come back to haunt me?
<Brackson>
darix: is there any way to terminate the parent script and print the error if the child script gets an error?
full_throttle has quit [Quit: Lost terminal]
rubie has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 260 seconds]
kadoppe has quit [Ping timeout: 260 seconds]
kadoppe has joined #ruby
rubie has joined #ruby
kadoppe has quit [Ping timeout: 252 seconds]
LoneHerm_ has quit [Remote host closed the connection]
marr has joined #ruby
_3by8 has quit [Quit: Page closed]
ta_ has joined #ruby
bronson has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
smathy is now known as smathy_afk
stupidystupid has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
jhack has quit [Quit: jhack]
idletask has quit [Ping timeout: 276 seconds]
flashpoint9 has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
shazaum_ has joined #ruby
baweaver has joined #ruby
stupidystupid has joined #ruby
ctarx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 276 seconds]
mistermocha has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Begi has quit [Quit: Begi]
baweaver has quit [Ping timeout: 250 seconds]
<Total_Meltdown>
adaedera: Nice, I got that working. Thanks.
Inside has quit [Ping timeout: 244 seconds]
freerobby has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
zast has joined #ruby
Lomex has quit [Remote host closed the connection]
Xeago has joined #ruby
rolha has quit [Read error: Connection reset by peer]
zenlot has joined #ruby
jdm_ has quit [Remote host closed the connection]
jdm_ has joined #ruby
zenlot6 has quit [Ping timeout: 276 seconds]
zarubin has quit [Quit: leaving]
rolha has joined #ruby
n008f4g_ has quit [Ping timeout: 260 seconds]
madgen has quit [Ping timeout: 248 seconds]
<shevy>
adaedra! you just got some extra chars :)
thistle has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cippaciong has quit [Quit: WeeChat 1.4]
jdm_ has quit [Ping timeout: 244 seconds]
Rith has joined #ruby
felipec has quit [Quit: Leaving]
LaT0rtue has quit [Read error: Connection reset by peer]
idletask has joined #ruby
kadoppe has joined #ruby
baweaver has joined #ruby
thistle has quit []
thistle has joined #ruby
sauvin has joined #ruby
ensyde has joined #ruby
thistle has quit [Client Quit]
thistle has joined #ruby
idletask has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Remote host closed the connection]
pawnbox has joined #ruby
kadoppe has quit [Ping timeout: 260 seconds]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
x77686d has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
x77686d has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
idletask has joined #ruby
<shellie_>
I have a class inside multiple module's, but I can't seem to stub it from rspec. I think I may be writing the path to it wrong. Is there a way for me to easily print out the extended namespace of the function from the initializer to aid in debug?
jdm has joined #ruby
x77686d has quit [Remote host closed the connection]
stupidystupid has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tsou has quit [Remote host closed the connection]
x77686d has joined #ruby
Zai00 has quit [Quit: Zai00]
<mustmodify>
self.class.name ?
<mustmodify>
or self.ancestors.inspect ?
<mustmodify>
shellie_: ^
jdm has quit [Ping timeout: 244 seconds]
duckpuppy has joined #ruby
duderonomy has quit [Ping timeout: 268 seconds]
_stu__ has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
x77686d has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
_stu_ has quit [Read error: Connection reset by peer]
_stu__ is now known as _stu_
duckpuppy has quit [Ping timeout: 244 seconds]
flashpoint9 has joined #ruby
jdm has joined #ruby
rubie has quit [Remote host closed the connection]
Ropeney has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
Guest79684 has joined #ruby
jdm has quit [Remote host closed the connection]
dc4 has joined #ruby
jdm has joined #ruby
shazaum_ has quit [Quit: Leaving]
Guest79684 has quit []
jdm has quit [Remote host closed the connection]
jdm has joined #ruby
Inside has joined #ruby
dvinciguerra_ has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
AccordLTN has joined #ruby
AccordLTN has quit [Client Quit]
BTRE has quit [Ping timeout: 264 seconds]
stannard has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
nodejunkie has joined #ruby
Ropeney has joined #ruby
kung has joined #ruby
hahuang61 has joined #ruby
fir3starter has joined #ruby
<kung>
what does the * mean before something?
<kung>
s2.connect(*s1.addr.values_at(3,1))
hakunin_ has joined #ruby
xcesariox has joined #ruby
<Radar>
kung: it's the splat operator
<Radar>
kung: It will pass the array elements as individual arguments to that method.
<kung>
Radar, ah ok
stupidystupid has joined #ruby
hakunin has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
<kung>
how to keep ruby running after script has finished?
<kung>
wanna analyze the var contents
<Radar>
kung: require 'pry', then binding.pry at the end of it.
<Radar>
You may need to install the pry gem
<kung>
thanks, gonna try :D
BTRE has joined #ruby
diegoaguilar has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
tvon has quit [Quit: Peace out, y'all!]
djbkd has quit [Quit: Leaving...]
ur5us has quit [Remote host closed the connection]
rahult has joined #ruby
hexagoxel has left #ruby ["Leaving"]
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
dgncn has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]