arguments icon indicating copy to clipboard operation
arguments copied to clipboard

doesn't allow for class variables?

Open rdp opened this issue 16 years ago • 1 comments

class A
  @@about = 'about'
  class << self
  def A.go(b = @@about)
   b
  end
  named_args_for :go
  end

 end

Here's the doctest: >> A.go => "about" >> A.go => "about" >> A.go 2 => 2 >> A.go :b => 3 => 3

I'm not sure how but I think my old implementation handled this somehow, so it should be possible somehow or other.

rdp avatar Jul 08 '09 14:07 rdp

Yeah, it has to do with the scope I think... mmm

maca avatar Aug 07 '09 04:08 maca