scry: move `rpc` method definition out of `test` block. (#109599)
scry: move `rpc` method definition out of `test` block. (#109599)

Defining methods inside `test` blocks is no longer supported as of
Homebrew/brew#13753.

Fixes a CI failure spotted in #106925:

      Error: scry: failed
      An exception occurred within a child process:
        FrozenError: can't modify frozen class
sjackman/homebrew-core,chrisfinazzo/homebrew-core,makigumo/homebrew-core,sjackman/homebrew-core,adam-moss/homebrew-core,filcab/homebrew-core,nandub/homebrew-core,nandub/homebrew-core,chrisfinazzo/homebrew-core,adam-moss/homebrew-core,stgraber/homebrew-core,lemzwerg/homebrew-core,filcab/homebrew-core,stgraber/homebrew-core,makigumo/homebrew-core,Homebrew/homebrew-core,Homebrew/homebrew-core,lemzwerg/homebrew-core