Apply the same monkey-bussines as in the IRB adapter

See gsamokovarov/web-console@baa6984ef4fa402b9977f5cc01d16b9240db7795.