# [Dingus][1], Ruby

The password is:

    G=->*x do;i=0;while x[0][i]!~x[1] do;i+=1;end;x[0][i];end;Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]

* Gets access to [`putc`][2] by listing all the available (private) methods and filters them with regexen.
* Also redefines [`p`][3] to not do anything.
* a lambda is used instead of `def`
* `method :method_name` with `[]` is used instead of `()`
* `.` cannot be used, so only the methods for `Object` and `Kernel` are available
* Since `putc` is available, any string could be written.

FORTRAN like code:

    GET_METHOD = ->*x do
      i=0
      while x[0][i]!~x[1] do
        i+=1
      end
      x[0][i]
    end
    PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
    PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
    DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
    P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
    DEFINE_METHOD[P]{|x|}
    PUTC[34]
    PUTC[34]
    PUTC[34]
    PUTC[10]

[Try it online!](https://tio.run/##KypNqvz/v0AhtSwxR0PFRq8oNTFFr6RIPTg5raCsUs/KPkZdSdUmQUNdR0Vf8/9/d9eQeF/XEA9/FwVbBV07rQqFlHwuBYVMWwMgWZ6RmZOqUBFtEBudGatYVxFtGAuRBirQtjUEMlLzUoAkVAUXiBcQ5BnmGOIKNbTYNje1JCM/RQFhTzREpFhHPy46X7cwtihTP5YrIDTEGYtSNMOiY3X0gXqKYktLopN0U2KBGl1c3Tz9YAqIMyEuJRVkoy0BVWCLYqrQ7YgOiK2uqaipBTs52tgkFhfD0CAWAA "Ruby – Try It Online")


  [1]: https://codegolf.stackexchange.com/questions/213962/guess-my-password-cops-thread/214164#214164
  [2]: https://ruby-doc.org/core-2.7.0/Kernel.html#method-i-putc
  [3]: https://ruby-doc.org/core-2.7.0/Kernel.html#method-i-p