closer changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
nokada has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
nokada has joined #ruby-core
zzak has quit [Remote host closed the connection]
zzak has joined #ruby-core
nokada has quit [Remote host closed the connection]
<zzak>
[realname, irc.freenode.net] Is this the main ruby irc?
<zzak>
[realname, irc.freenode.net] Do I need to initialize all my variables in an initialize method for a particular class or can I define them outside the methods in that class?
<zzak>
[realname, irc.freenode.net] Is a class just composed of methods? AKA, nothing outside the methods?
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby-core
<zzak>
[SpaceghostC2C, irc.freenode.net] _kraken: Ruby is quite dynamic.
<zzak>
[SpaceghostC2C, irc.freenode.net] Methods needn't even exist until runtime, and sometimes don't exist at all times in runtime.
<zzak>
[SpaceghostC2C, irc.freenode.net] Quite the magical thing.
<zzak>
[Nicholas Treffiletti, irc.freenode.net] anyone used the mapbox-rails gem?
<zzak>
[Beauby, irc.freenode.net] Hi there. I have a conditional module inclusion in my gem (`if defined?(ActionController); require 'rails-specific-stuff'; end;`). For testing purposes, how can I load ActionController before my gem itself? (using rspec)
nokada has joined #ruby-core
<zzak>
[realname, irc.freenode.net] Do you guys use blocks and procs alot with methods? These confuse me so fucking much
<zzak>
[Beauby, irc.freenode.net] _kraken: Yeah they are useful when you want to pass an arbitrary function around (for instance taking a `formatter` lambda/prock as a parameter)
<zzak>
[bazz, irc.freenode.net] change your spec before changing the code!!
<zzak>
[SpaceghostC2C, irc.freenode.net] _kraken: They can be really useful, but I typically try not to make an excuse for them where they aren't necessary in code I share with others.
<zzak>
[SpaceghostC2C, irc.freenode.net] Though DSLs and nice method interfaces are welcome.
<zzak>
[Beauby, irc.freenode.net] bazzy: was your comment for me?
<zzak>
[bazz, irc.freenode.net] it's for everyone!~
<zzak>
[bazz, irc.freenode.net] does this sound right?
<zzak>
[bazz, irc.freenode.net] to answer (why change spec before change code)
<zzak>
[bazz, irc.freenode.net] if you created tests already .. and then you think "Ou .. I am going to change how my thingy works.. then you want to change your spec (tests) FIRST! before changing the code! it helps breath life into your idea and provides the new tests first so you can work on getting them to pass!
<zzak>
[bazz, irc.freenode.net] is there a better clearer answer to "WHY change spec before code" ?
<zzak>
[Beauby, irc.freenode.net] bazzy: Philosophically, in TDD, you define behavior in your spec, and you make your code fulfill the specs. The spec is the contract. Plus, if you change your code first and your spec later, you're clouded with your implementation.
<zzak>
[bazz, irc.freenode.net] beauby, elaborate
<zzak>
[bazz, irc.freenode.net] "clouded with your impl"
<zzak>
[bazz, irc.freenode.net] you mean mentally
<zzak>
[bazz, irc.freenode.net] impl details are extranneous
<zzak>
[Beauby, irc.freenode.net] bazzy: There's a chance if you write code first you will be biased when writing the spec
<zzak>
[bazz, irc.freenode.net] Are there any considerations to take when you maintain a codebase that lacks a testing framework, and you want to create one.. or an approach proven?
ni_ has joined #ruby-core
<zzak>
[bazz, irc.freenode.net] how come, for attr_accessor :var , you can read 'var' but you cannot do 'var =' you must do `self.var =` or `@var =`
<zzak>
[apeiros, irc.freenode.net] bazzy: because how'd it otherwise know you mean the method `var =` and don't want to assign to a local variable?
<znz_jp>
biff: [ruby-changes:42950] akr:r55024 (trunk): [Feature #12005] Unify Fixnum and Bignum into Integer - http://mla.n-z.jp/?ruby-changes=42950