0

When I access the singleton class of an object using the following code

(class << object; self; end) 

The srb command raises an error:

class << EXPRESSION is only supported for class << self https://srb.help/3001 

Due to special circumstances (proxy/mock object) I cannot call any methods on the object. The object especially is extremely unenthusiastic about being asked about singleton_class, instance eval, instance_exec or binding, so I need to use this expression.

How can I suppress this error? Wrapping the expression in T.unsafe did not help.

1 Answer 1

1

It looks like your best bet is to isolate this test (I assume it is due to the proxy/mock reference) in its own file and mark that file as typed: ignore. Since the error is a processing stage error (specifically, 3xxx errors are from the desugaring stage where code is being rewritten for simpler representation), it won't be suppressible with T.unsafe or other methods.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.