Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
# "sexp" variable contents at top of Arguments#consume in lib/compiler/nodes.rb ~ line 1146 # initial args sexp: [[], [:b], nil, [:block, [:lasgn, :a, [:lasgn, :b, [:hash]]]]] # return value at bottom of that method: (@name added to inspect for clarity) # updated args sexp: [[], [:b], nil, [#<Compiler:lasgn @name=>:a>]] # based on the following input program: def foo(a = b = {}) end # What ends up happening is that "@mapped_defaults" uses :a as its key to this lasgn, rather than :b as it should # When that default is needed in bytecode.rb, it is looked up via :b and returns nil
This paste will be private.
From the Design Piracy series on my blog: