How to improve Ruby code under some restrictions I'm (still) trying to make another submission to the Largest Number Printable question, and I've got the following bit of code:

f=-&gt;a{b,c,d=a;b ?a==b ?~-a:a==a-[c-c]?[[b,c,f[d]],~-c,b]:b:$n}
h=[],$n=?~.ord,[]
h=f[h]until h==p($n+=$n)-$n


Ungolfed:

f=-&gt;{b,c,d=a
if b
  if a==b # a is not an array
    return a-1
  elsif a==a-[0] # a does not contain 0
    t = [b,c,f[d]]
    return [t,c-1,b]
  else # a is an array containing 0
    return b
  end
else # if a == []
  return $n
end}

$n = 126
h = [[],n,[]]

until h==0 do
  $n += $n
  p $n
  h = f[h]
end


The conditions I'm working with:


Maximum 100 bytes.
No digits allowed in my code.


My code is currently at 108 bytes, but I can't figure out how to golf it further.

The h==p($n+=$n)-$n may be replaced with h==0, but I can't use digits and I still need to print $n and apply $n+=$n in the until loop.

I'm also satisfied with code that replaces $n+=$n with $n+=1, but I can't use digits unfortunately.

Any suggestions?
105

You can save three bytes by declaring n as a local variable (instead of a global) before f:



n=?~.ord
f=-&gt;a{b,c,d=a;b ?a==b ?~-a:a==a-[c-c]?[[b,c,f[d]],~-c,b]:b:n}
h=[],n,[]
h=f[h]until h==p(n+=n)-n