ruby: applied changes for shared pipes as per python changes