about summary refs log tree commit homepage
path: root/lib/dtas/buffer/splice.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-20 01:39:15 +0000
committerEric Wong <e@80x24.org>2020-01-06 08:15:15 +0000
commit01fec98a75a6c879c96b3c757557559b9bd18a19 (patch)
treee43df1eef9730e2fb50be264550af9e104d22782 /lib/dtas/buffer/splice.rb
parent940c0b3cffa7f691620e7890ada15c7519817307 (diff)
downloaddtas-01fec98a75a6c879c96b3c757557559b9bd18a19.tar.gz
Fiddle exists on all Ruby 1.9.2+ installations and seems
alright.  Since splice is a Linux-only API, we don't need to
worry about the values of constants changing (and they're
architecture-independent).
Diffstat (limited to 'lib/dtas/buffer/splice.rb')
-rw-r--r--lib/dtas/buffer/splice.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dtas/buffer/splice.rb b/lib/dtas/buffer/splice.rb
index 2e86d0a..b234a57 100644
--- a/lib/dtas/buffer/splice.rb
+++ b/lib/dtas/buffer/splice.rb
@@ -5,6 +5,8 @@ require 'io/nonblock'
 require 'sleepy_penguin'
 require_relative '../../dtas'
 require_relative '../pipe'
+SleepyPenguin.respond_to?(:splice) or
+  raise LoadError, 'sleepy_penguin 3.5+ required for splice', []
 
 # Used by -player on Linux systems with the "sleepy_penguin" RubyGem installed
 module DTAS::Buffer::Splice # :nodoc: