* 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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-10-07 05:18:57 +00:00
Родитель 87d7a06660
Коммит 6b35c34c68
16 изменённых файлов: 42 добавлений и 31 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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

Просмотреть файл

@ -13,7 +13,7 @@
require "shell/filter"
class Shell
class BuiltInCommand<Filter
class BuiltInCommand < Filter
def wait?
false
end

Просмотреть файл

@ -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".)
*
*/

Просмотреть файл

@ -1,6 +1,6 @@
require 'delegate'
class ExtArray<DelegateClass(Array)
class ExtArray < DelegateClass(Array)
def initialize()
super([])
end

Просмотреть файл

@ -30,7 +30,7 @@ f.printf "%s\n", Foo
f.quux
class Bar<Foo
class Bar < Foo
def quux
super
baz()

Просмотреть файл

@ -17,7 +17,7 @@ class TestMethod < Test::Unit::TestCase
end
end
class B<A
class B < A
private :foo1, :foo2
end