Q:

What would the following code 'Thread | ->' do in ruby?

I can't figure out what this code does here. The best I can tell is | is the bit-wise OR and -> is for a lambda, but still can't make sense of it as a whole.
pipe = Thread | -> (p) do
       end

A:

The code doesn't do anything yet. It's a correct (but kinda weird) syntax, and the defined lambda doesn't do anything.
| isn't bit-wise OR, it's a method name of the Thread class, for the ruby-thread gem:
require 'thread/pipe'

p = Thread |-> d { d * 2 } |-> d { d * 4 }
p << 2

puts ~p # => 16

But you're right though, it's possible to call then method | without using a . between Thread and the method name because Ruby's syntax allows code like 2 | 3 as a sugar for 2.|(3).
Without the gem, Ruby complains about a NoMethodError. To play a bit with the syntax, you could try:
class Thread
  def self.|(some_proc)
    some_proc.call("some_param")
  end
end

pipe = Thread | -> (p) do
  puts "Inside a proc, called from 'Thread.|' with parameter #{p}"
end

It outputs:
Inside a proc, called from 'Thread.|' with parameter some_param

Another way to write the call would be :
pipe = Thread.|( lambda{|param| puts "Inside a proc, called from 'Thread.|' with parameter #{param}"} )

