<peder>
weaksauce: TERM=xterm-mono does not work, neither does RUBY_TESTOPTS=--color=never
Oxfuxxx has quit [Ping timeout: 240 seconds]
jmcgnh has joined #ruby
Rounin has joined #ruby
<peder>
'ruby -wc |& cat' does, and then fetch rubys exit code from ${PIPESTATUS[n]}
michigan has quit []
Oxfuxxx has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
perrierjouet has quit [Ping timeout: 250 seconds]
roadie has joined #ruby
perrierjouet has joined #ruby
michigan has joined #ruby
jetchisel has joined #ruby
jetchisel has quit [Client Quit]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
elf_fortrez has joined #ruby
roadie has joined #ruby
elf_fortrez has quit [Client Quit]
jetchisel has joined #ruby
elf_fortrez has joined #ruby
ollysmith has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
cnsvc has quit [Quit: %bye%]
ollysmith has joined #ruby
cnsvc has joined #ruby
pyrareae has quit [Ping timeout: 252 seconds]
pyrareae has joined #ruby
mrkz_c has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
<nakilon>
does spec.executable in .gemspec really mean anything?
<nakilon>
oh, probably it won't create the shim
<nakilon>
if it's not specified like this
elf_fortrez has quit [Ping timeout: 246 seconds]
nik has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
<nakilon>
guys, when I want to make custom class that behaves like String but also has one extra field that I pass when create such object, I do: MyClass < String .... def initialize string, extra ; super string ; @extra = extra ....; and then I call it like x = MyClass.new "asd", extra
<nakilon>
but once I decided to derive from Fixnum, not String, it started saying there is no method new
<nakilon>
how do I properly derive from Fixnum?
<nakilon>
or should I just use refinement...
<adam12>
Fixnum's are essentially singleton's, AFAIK.
<adam12>
You could maybe try delegateclass, but I've never tried it for Fixnum's before.
<nakilon>
(also if I try to add instance variable directly to Fixnum instance I get "can't modify frozen Fixnum")
bobdobbs has quit [Read error: Connection reset by peer]
<nakilon>
the initial problem is that my program is made with thinking that "those things are Fixnums" and now I want it to be able to get more info from them like they were tuples with an extra value but I don't want to rewrite it to operate them like tuples because it would pollute code with needless splatting
<nakilon>
DelegateClass seems to be working
<nakilon>
majestically it does not fail on "super num"
<adam12>
Should work as long as you don't === Fixnum
roadie has quit [Ping timeout: 240 seconds]
maroloccio has joined #ruby
perrierjouet has quit [Ping timeout: 252 seconds]
noa has joined #ruby
perrierjouet has joined #ruby
roadie has joined #ruby
dachinat has quit [Remote host closed the connection]
dachinat has joined #ruby
maroloccio has quit [Quit: WeeChat 3.0]
maroloccio has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
maroloccio has quit [Client Quit]
maroloccio has joined #ruby
roadie has joined #ruby
<rapha>
jhass[m]: so, finally figured it out. just having an empty module called Array will mess some things up wrt arrays. changed it into a refinement, now all is well.
<jhass[m]>
which is why I suggested ::Array
<jhass[m]>
"only breaks inside some module" smelled like constant lookup rules from the start
<rapha>
jhass[m]: yeah, i didn't understand that and thus didn't pay as much attention to it as i should have.
<rapha>
oh, wait, so, calling the module "::Array" disambiguates the whole thing to the interpreter, then?
<jhass[m]>
:: starts constant lookup at the toplevel namespace (in effect at Object)
roadie has quit [Ping timeout: 240 seconds]
<jhass[m]>
plain constant reference looks up in Module.nesting
<Guest94>
Hello, In this method definition: `def value=(value){return value} end ` What the meaning of the equale sign? Thanks
<nakilon>
it's a part of the method name
<Guest94>
nakilon Does it have a special meaning?
<nakilon>
ever time you do a = b you implicitely do a.=(b)
<nakilon>
in Ruby you can't just assign value to some class instance attribute -- you have to call a "setter" method
<nakilon>
and it's just a convenience to call them with = in the end
<nakilon>
*to name them
<Guest94>
nakilon I sometimes see method that ends with a question marks "?" wich usually, return a bolean, something like `def ready? {.....}`. So I was wondering if the "=" signe have similar meaning
<nakilon>
it's the same "convenience", just a nice practice
<nakilon>
maybe there is something more behind =, idk
<newton>
they don't do anything special it's up to you to use them in your method names (? usually suggests the method returns a boolean, ! suggests it mutates data)
<nakilon>
I suppose if in that snippet you don't define the value=, you are unable to assign to that attribute
<Guest94>
nakilon but isn't `value=` a method? I thought it was supposed to receive an argument
<adam12>
Guest94: it does. (value)
<adam12>
Guest94: if you think of it as message passing, `foobar.value = 1` is essentially `foobar.send(:value=, 1)`. You can see `value=` as the method name when you break it up like that, and less so as an assignment.
<Guest94>
So in ruby, a method is a class instance attribute too?
<adam12>
Guest94: It can be, if you look at it that way.
rubion has joined #ruby
<adam12>
Guest94: Instances of a class have methods. They may or may not accept a parameter. They may or may not return a value. They may or may not contain state (to be considered an attribute?). You send a message to the object, it may update state of the object. It may return a useful value.
<adam12>
It may do nothing :P
Guest94 has quit [Ping timeout: 246 seconds]
mrkz_c has quit [Quit: Connection closed for inactivity]
Oxfuxxx has quit [Ping timeout: 250 seconds]
jpw_ has quit [Ping timeout: 250 seconds]
jpw has joined #ruby
maroloccio has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
jpw has quit [Remote host closed the connection]
jpw has joined #ruby
maroloccio has quit [Quit: WeeChat 3.0]
_ht has quit [Remote host closed the connection]
noa has joined #ruby
Guest19 has joined #ruby
jpw has quit [Remote host closed the connection]
<Guest19>
adam12 Thanks for the information
<Guest19>
about class instance variable...
Guest19 has quit [Quit: Client closed]
Bitflux is now known as Byteflux
noa has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
splud has quit [Ping timeout: 240 seconds]
splud has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
SuperLag has quit [Remote host closed the connection]
roadie has joined #ruby
invisage has joined #ruby
<invisage>
hello?
invisage has left #ruby [#ruby]
<newton>
nakilon, I forgot I asked a question last night re api wrappers. good being subjective to the person making the recommendation and "why more wrappers" I was curious how people were implementing their testing of api requests and responses
<newton>
I decided to go with vcr ¯\_( ͡° ͜ʖ ͡°)_/¯
roadie has quit [Ping timeout: 250 seconds]
Bish has quit [Ping timeout: 252 seconds]
shokohsc has quit [Remote host closed the connection]
Bish has joined #ruby
shokohsc has joined #ruby
desnudopenguino has quit [Ping timeout: 250 seconds]
rob has joined #ruby
<rob>
Given a hash of arrays, how might one invert it without assignment such that: