2011-05-17 23:59:14 +01:00
|
|
|
require 'rspec'
|
2011-06-21 21:18:23 +01:00
|
|
|
require 'em-spec/rspec'
|
2011-05-17 23:59:14 +01:00
|
|
|
|
|
|
|
$: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2011-05-19 01:06:54 +01:00
|
|
|
|
|
|
|
def binary(str_ary)
|
|
|
|
str_ary.collect do |d|
|
|
|
|
raise ArgumentError.new("Bad part") unless d =~ /\A[a-f0-9]{2}\Z/i
|
|
|
|
d.to_i(16).chr
|
|
|
|
end.join("")
|
|
|
|
end
|
2011-06-21 21:18:23 +01:00
|
|
|
|