aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rwxr-xr-xbasictest/test.rb6
-rw-r--r--lib/irb/cmd/chws.rb4
-rw-r--r--lib/irb/cmd/fork.rb2
-rw-r--r--lib/irb/cmd/help.rb2
-rw-r--r--lib/irb/cmd/load.rb6
-rw-r--r--lib/irb/cmd/pushws.rb6
-rw-r--r--lib/irb/cmd/subirb.rb8
-rw-r--r--lib/irb/notifier.rb6
-rw-r--r--lib/irb/output-method.rb2
-rw-r--r--lib/prime.rb4
-rw-r--r--lib/shell/builtin-command.rb2
-rw-r--r--object.c8
-rw-r--r--sample/delegate.rb2
-rw-r--r--sample/export.rb2
-rw-r--r--test/-ext-/method/test_arity.rb2
16 files changed, 42 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index d0a2f08b65..dd17e1b256 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Fri Oct 7 14:18:40 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * basictest/test.rb: Adjust spaces in class declarations
+ with inheritance. [fix GH-1227] Patch by @adrfer
+ * lib/irb/*: ditto.
+ * lib/prime.rb: ditto.
+ * lib/shell/builtin-command.rb: ditto.
+ * object.c: ditto.
+ * sample/*.rb: ditto.
+ * test/-ext-/method/test_arity.rb: ditto.
+
Thu Oct 6 17:29:44 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* load.c (rb_require_safe): SyntaxError created by the parser just
diff --git a/basictest/test.rb b/basictest/test.rb
index 8472a0d14a..25d52ca1ef 100755
--- a/basictest/test.rb
+++ b/basictest/test.rb
@@ -2242,11 +2242,11 @@ test_check "alias"
class Alias0
def foo; "foo" end
end
-class Alias1<Alias0
+class Alias1 < Alias0
alias bar foo
def foo; "foo+" + super end
end
-class Alias2<Alias1
+class Alias2 < Alias1
alias baz foo
undef foo
end
@@ -2258,7 +2258,7 @@ test_ok(x.baz == "foo+foo")
# test_check for cache
test_ok(x.baz == "foo+foo")
-class Alias3<Alias2
+class Alias3 < Alias2
def foo
defined? super
end
diff --git a/lib/irb/cmd/chws.rb b/lib/irb/cmd/chws.rb
index 606e0c52a9..e93c976f82 100644
--- a/lib/irb/cmd/chws.rb
+++ b/lib/irb/cmd/chws.rb
@@ -17,13 +17,13 @@ require "irb/ext/change-ws.rb"
module IRB
module ExtendCommand
- class CurrentWorkingWorkspace<Nop
+ class CurrentWorkingWorkspace < Nop
def execute(*obj)
irb_context.main
end
end
- class ChangeWorkspace<Nop
+ class ChangeWorkspace < Nop
def execute(*obj)
irb_context.change_workspace(*obj)
irb_context.main
diff --git a/lib/irb/cmd/fork.rb b/lib/irb/cmd/fork.rb
index 552c3962f6..ae4d51b5d1 100644
--- a/lib/irb/cmd/fork.rb
+++ b/lib/irb/cmd/fork.rb
@@ -14,7 +14,7 @@
# :stopdoc:
module IRB
module ExtendCommand
- class Fork<Nop
+ class Fork < Nop
def execute
pid = send ExtendCommand.irb_original_method_name("fork")
unless pid
diff --git a/lib/irb/cmd/help.rb b/lib/irb/cmd/help.rb
index 7a09c396e1..db2bd567e5 100644
--- a/lib/irb/cmd/help.rb
+++ b/lib/irb/cmd/help.rb
@@ -16,7 +16,7 @@ require "irb/cmd/nop.rb"
# :stopdoc:
module IRB
module ExtendCommand
- class Help<Nop
+ class Help < Nop
begin
Ri = RDoc::RI::Driver.new
rescue SystemExit
diff --git a/lib/irb/cmd/load.rb b/lib/irb/cmd/load.rb
index e3b84dad79..f800b741eb 100644
--- a/lib/irb/cmd/load.rb
+++ b/lib/irb/cmd/load.rb
@@ -16,7 +16,7 @@ require "irb/ext/loader"
# :stopdoc:
module IRB
module ExtendCommand
- class Load<Nop
+ class Load < Nop
include IrbLoader
def execute(file_name, priv = nil)
@@ -24,7 +24,7 @@ module IRB
end
end
- class Require<Nop
+ class Require < Nop
include IrbLoader
def execute(file_name)
@@ -55,7 +55,7 @@ module IRB
end
end
- class Source<Nop
+ class Source < Nop
include IrbLoader
def execute(file_name)
source_file(file_name)
diff --git a/lib/irb/cmd/pushws.rb b/lib/irb/cmd/pushws.rb
index aa14430ce4..ffe55abed6 100644
--- a/lib/irb/cmd/pushws.rb
+++ b/lib/irb/cmd/pushws.rb
@@ -16,20 +16,20 @@ require "irb/ext/workspaces.rb"
# :stopdoc:
module IRB
module ExtendCommand
- class Workspaces<Nop
+ class Workspaces < Nop
def execute(*obj)
irb_context.workspaces.collect{|ws| ws.main}
end
end
- class PushWorkspace<Workspaces
+ class PushWorkspace < Workspaces
def execute(*obj)
irb_context.push_workspace(*obj)
super
end
end
- class PopWorkspace<Workspaces
+ class PopWorkspace < Workspaces
def execute(*obj)
irb_context.pop_workspace(*obj)
super
diff --git a/lib/irb/cmd/subirb.rb b/lib/irb/cmd/subirb.rb
index f29548b88f..c1602f6e45 100644
--- a/lib/irb/cmd/subirb.rb
+++ b/lib/irb/cmd/subirb.rb
@@ -15,25 +15,25 @@ require "irb/ext/multi-irb"
# :stopdoc:
module IRB
module ExtendCommand
- class IrbCommand<Nop
+ class IrbCommand < Nop
def execute(*obj)
IRB.irb(nil, *obj)
end
end
- class Jobs<Nop
+ class Jobs < Nop
def execute
IRB.JobManager
end
end
- class Foreground<Nop
+ class Foreground < Nop
def execute(key)
IRB.JobManager.switch(key)
end
end
- class Kill<Nop
+ class Kill < Nop
def execute(*keys)
IRB.JobManager.kill(*keys)
end
diff --git a/lib/irb/notifier.rb b/lib/irb/notifier.rb
index 9d8de82e69..a21e865f2e 100644
--- a/lib/irb/notifier.rb
+++ b/lib/irb/notifier.rb
@@ -113,7 +113,7 @@ module IRB
# create a new composite notifier. Using the first composite notifier
# object you create, sibling notifiers can be initialized with
# #def_notifier.
- class CompositeNotifier<AbstractNotifier
+ class CompositeNotifier < AbstractNotifier
# Create a new composite notifier object with the given +prefix+, and
# +base_notifier+ to use for output.
def initialize(prefix, base_notifier)
@@ -174,7 +174,7 @@ module IRB
# A leveled notifier is comparable to the composite group from
# CompositeNotifier#notifiers.
- class LeveledNotifier<AbstractNotifier
+ class LeveledNotifier < AbstractNotifier
include Comparable
# Create a new leveled notifier with the given +base+, and +prefix+ to
@@ -212,7 +212,7 @@ module IRB
#
# This notifier is used as the +zero+ index, or level +0+, for
# CompositeNotifier#notifiers, and will not output messages of any sort.
- class NoMsgNotifier<LeveledNotifier
+ class NoMsgNotifier < LeveledNotifier
# Creates a new notifier that should not be used to output messages.
def initialize
@base_notifier = nil
diff --git a/lib/irb/output-method.rb b/lib/irb/output-method.rb
index 7d64851698..935a127d0a 100644
--- a/lib/irb/output-method.rb
+++ b/lib/irb/output-method.rb
@@ -82,7 +82,7 @@ module IRB
end
# A standard output printer
- class StdioOutputMethod<OutputMethod
+ class StdioOutputMethod < OutputMethod
# Prints the given +opts+ to standard output, see IO#print for more
# information.
def print(*opts)
diff --git a/lib/prime.rb b/lib/prime.rb
index a6700e3e8b..ab9e05b2fe 100644
--- a/lib/prime.rb
+++ b/lib/prime.rb
@@ -324,7 +324,7 @@ class Prime
# An implementation of +PseudoPrimeGenerator+ which uses
# a prime table generated by trial division.
- class TrialDivisionGenerator<PseudoPrimeGenerator
+ class TrialDivisionGenerator < PseudoPrimeGenerator
def initialize
@index = -1
super
@@ -345,7 +345,7 @@ class Prime
# This is a pseudo-prime generator, suitable on
# checking primality of an integer by brute force
# method.
- class Generator23<PseudoPrimeGenerator
+ class Generator23 < PseudoPrimeGenerator
def initialize
@prime = 1
@step = nil
diff --git a/lib/shell/builtin-command.rb b/lib/shell/builtin-command.rb
index c76fa81ee1..e419a68c33 100644
--- a/lib/shell/builtin-command.rb
+++ b/lib/shell/builtin-command.rb
@@ -13,7 +13,7 @@
require "shell/filter"
class Shell
- class BuiltInCommand<Filter
+ class BuiltInCommand < Filter
def wait?
false
end
diff --git a/object.c b/object.c
index 42a3f770ed..451746150d 100644
--- a/object.c
+++ b/object.c
@@ -1569,7 +1569,7 @@ rb_mod_eqq(VALUE mod, VALUE arg)
* is the same as <i>other</i>. Returns
* <code>nil</code> if there's no relationship between the two.
* (Think of the relationship in terms of the class definition:
- * "class A<B" implies "A<B".)
+ * "class A < B" implies "A < B".)
*
*/
@@ -1597,7 +1597,7 @@ rb_class_inherited_p(VALUE mod, VALUE arg)
* Returns true if <i>mod</i> is a subclass of <i>other</i>. Returns
* <code>nil</code> if there's no relationship between the two.
* (Think of the relationship in terms of the class definition:
- * "class A<B" implies "A<B".)
+ * "class A < B" implies "A < B".)
*
*/
@@ -1617,7 +1617,7 @@ rb_mod_lt(VALUE mod, VALUE arg)
* two modules are the same. Returns
* <code>nil</code> if there's no relationship between the two.
* (Think of the relationship in terms of the class definition:
- * "class A<B" implies "B>A".)
+ * "class A < B" implies "B > A".)
*
*/
@@ -1638,7 +1638,7 @@ rb_mod_ge(VALUE mod, VALUE arg)
* Returns true if <i>mod</i> is an ancestor of <i>other</i>. Returns
* <code>nil</code> if there's no relationship between the two.
* (Think of the relationship in terms of the class definition:
- * "class A<B" implies "B>A".)
+ * "class A < B" implies "B > A".)
*
*/
diff --git a/sample/delegate.rb b/sample/delegate.rb
index 918dc08877..dc7ea2a0af 100644
--- a/sample/delegate.rb
+++ b/sample/delegate.rb
@@ -1,6 +1,6 @@
require 'delegate'
-class ExtArray<DelegateClass(Array)
+class ExtArray < DelegateClass(Array)
def initialize()
super([])
end
diff --git a/sample/export.rb b/sample/export.rb
index 949e5b10bf..2ab2e93f2e 100644
--- a/sample/export.rb
+++ b/sample/export.rb
@@ -30,7 +30,7 @@ f.printf "%s\n", Foo
f.quux
-class Bar<Foo
+class Bar < Foo
def quux
super
baz()
diff --git a/test/-ext-/method/test_arity.rb b/test/-ext-/method/test_arity.rb
index d0032c6a50..2ba73c8d4c 100644
--- a/test/-ext-/method/test_arity.rb
+++ b/test/-ext-/method/test_arity.rb
@@ -17,7 +17,7 @@ class TestMethod < Test::Unit::TestCase
end
end
- class B<A
+ class B < A
private :foo1, :foo2
end