Doesn't look like those expressions work. If you need it soon, file a bug report and they'll probably get around to it quickly since they've already been working on the object lately.
Alternatively just use an instance variable to keep track of the class/id in the meantime as a workaround.