method

foo

Importance_0
v1_8_6_287 - Show latest stable - 0 notes - Class: IRB::OutputMethod
foo(format) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/irb/output-method.rb, line 48
    def foo(format)
      pos = 0
      inspects = []
      format.scan(/%[#0\-+ ]?(\*(?=[^0-9])|\*[1-9][0-9]*\$|[1-9][0-9]*(?=[^0-9]))?(\.(\*(?=[^0-9])|\*[1-9][0-9]*\$|[1-9][0-9]*(?=[^0-9])))?(([1-9][0-9]*\$)*)([diouxXeEfgGcsb%])/) {|f, p, pp, pos, new_pos, c|
        puts [f, p, pp, pos, new_pos, c].join("!")
        pos = new_pos if new_pos
        if c == "I"
          inspects.push pos.to_i 
          (f||"")+(p||"")+(pp||"")+(pos||"")+"s"
        else
          $&
        end
      }
    end
Register or log in to add new notes.