summaryrefslogtreecommitdiff
path: root/spec/ruby/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/fixtures')
-rw-r--r--spec/ruby/fixtures/code/d/load_fixture.rb.rb1
-rw-r--r--spec/ruby/fixtures/constants.rb2
-rw-r--r--spec/ruby/fixtures/enumerator/classes.rb15
-rw-r--r--spec/ruby/fixtures/io.rb12
-rw-r--r--spec/ruby/fixtures/math/common.rb3
-rw-r--r--spec/ruby/fixtures/rational.rb14
6 files changed, 14 insertions, 33 deletions
diff --git a/spec/ruby/fixtures/code/d/load_fixture.rb.rb b/spec/ruby/fixtures/code/d/load_fixture.rb.rb
new file mode 100644
index 0000000000..7e9217729a
--- /dev/null
+++ b/spec/ruby/fixtures/code/d/load_fixture.rb.rb
@@ -0,0 +1 @@
+ScratchPad << :rbrb
diff --git a/spec/ruby/fixtures/constants.rb b/spec/ruby/fixtures/constants.rb
index ffe45fb1f6..7f0b88daab 100644
--- a/spec/ruby/fixtures/constants.rb
+++ b/spec/ruby/fixtures/constants.rb
@@ -10,7 +10,7 @@
# variety in class and module configurations, including hierarchy,
# containment, inclusion, singletons and toplevel.
#
-# Constants are numbered for for uniqueness. The CS_ prefix is uniformly used
+# Constants are numbered for uniqueness. The CS_ prefix is uniformly used
# and is to minimize clashes with other toplevel constants (see e.g. ModuleA
# which is included in Object). Constant values are symbols. A numbered suffix
# is used to distinguish constants with the same name defined in different
diff --git a/spec/ruby/fixtures/enumerator/classes.rb b/spec/ruby/fixtures/enumerator/classes.rb
deleted file mode 100644
index 6f285b8efa..0000000000
--- a/spec/ruby/fixtures/enumerator/classes.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-module EnumSpecs
- class Numerous
-
- include Enumerable
-
- def initialize(*list)
- @list = list.empty? ? [2, 5, 3, 6, 1, 4] : list
- end
-
- def each
- @list.each { |i| yield i }
- end
- end
-
-end
diff --git a/spec/ruby/fixtures/io.rb b/spec/ruby/fixtures/io.rb
new file mode 100644
index 0000000000..87ebbbb2bd
--- /dev/null
+++ b/spec/ruby/fixtures/io.rb
@@ -0,0 +1,12 @@
+module IOSpec
+ def self.exhaust_write_buffer(io)
+ written = 0
+ buf = " " * 4096
+
+ while true
+ written += io.write_nonblock(buf)
+ end
+ rescue Errno::EAGAIN, Errno::EWOULDBLOCK
+ written
+ end
+end
diff --git a/spec/ruby/fixtures/math/common.rb b/spec/ruby/fixtures/math/common.rb
deleted file mode 100644
index 024732fa7a..0000000000
--- a/spec/ruby/fixtures/math/common.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class IncludesMath
- include Math
-end
diff --git a/spec/ruby/fixtures/rational.rb b/spec/ruby/fixtures/rational.rb
deleted file mode 100644
index 844d7f9820..0000000000
--- a/spec/ruby/fixtures/rational.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-module RationalSpecs
- class SubNumeric < Numeric
- def initialize(value)
- @value = Rational(value)
- end
-
- def to_r
- @value
- end
- end
-
- class CoerceError < StandardError
- end
-end