def maybe_wrap_callback(meth_name, cb)
        return cb unless cb and chrooted? and (meth_name == :create)

        lambda do |hash|
          # in this case the string will be the absolute zookeeper path (i.e.
          # with the chroot still prepended to the path). Here's where we strip it off
          hash[:string] = strip_chroot_from(hash[:string])

          # call the original callback
          cb.call(hash)
        end
      end
def maybe_wrap_callback(meth_name, cb)
        return cb unless cb and chrooted? and (meth_name == :create)

        lambda do |hash|
          # in this case the string will be the absolute zookeeper path (i.e.
          # with the chroot still prepended to the path). Here's where we strip it off
          hash[:string] = strip_chroot_from(hash[:string])

          # call the original callback
          cb.call(hash)
        end
      end
this is a hack: to provide consistency between the C and Java drivers when
 using a chrooted connection, we wrap the callback in a block that will
 strip the chroot path from the returned path (important in an async create
 sequential call). This is the only place where we can hook *just* the C
 version. The non-async manipulation is handled in ZookeeperBase#create.

 TODO: need to move the continuation setup into here, so that it can get
       added to the callback hash