ruby-changes:71775
From: Tim <ko1@a...>
Date: Tue, 19 Apr 2022 08:32:47 +0900 (JST)
Subject: [ruby-changes:71775] 810b9c344a (master): Resolve several markedown warnings
https://git.ruby-lang.org/ruby.git/commit/?id=810b9c344a From 810b9c344a40802d7736282d86e51d48e8b336a4 Mon Sep 17 00:00:00 2001 From: Tim Smith <tsmith@m...> Date: Sun, 17 Apr 2022 21:53:43 -0700 Subject: Resolve several markedown warnings - Spaces before and after blocks. - Single spaces after sentences everywhere Signed-off-by: Tim Smith <tsmith@m...> --- NEWS.md | 12 ++++++------ README.md | 37 +++++++++++++++++-------------------- spec/README.md | 12 +++++++++++- spec/ruby/CONTRIBUTING.md | 14 ++++++++------ spec/ruby/README.md | 2 ++ 5 files changed, 44 insertions(+), 33 deletions(-) diff --git a/NEWS.md b/NEWS.md index 2157860187..1823f2bc05 100644 --- a/NEWS.md +++ b/NEWS.md @@ -33,14 +33,14 @@ Note that each entry is kept to a minimum, see links for details. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L33 * Constant assignment evaluation order for constants set on explicit objects has been made consistent with single attribute assignment - evaluation order. With this code: + evaluation order. With this code: ```ruby foo::BAR = baz ``` - `foo` is now called before `baz`. Similarly, for multiple assignment - to constants, left-to-right evaluation order is used. With this + `foo` is now called before `baz`. Similarly, for multiple assignments + to constants, left-to-right evaluation order is used. With this code: ```ruby @@ -121,7 +121,7 @@ Note: We're only listing outstanding class updates. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L121 * Refinement#refined_class has been added. [[Feature #12737]] * Set - * Set is now available as a builtin class without the need for `require "set"`. [[Feature #16989]] + * Set is now available as a built-in class without the need for `require "set"`. [[Feature #16989]] It is currently autoloaded via the `Set` constant or a call to `Enumerable#to_set`. * String @@ -143,7 +143,7 @@ Note: We're only listing outstanding class updates. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L143 ## Stdlib updates -* The following default gem are updated. +* The following default gems are updated. * RubyGems 3.4.0.dev * bigdecimal 3.1.2 * bundler 2.4.0.dev @@ -194,7 +194,7 @@ The following deprecated methods are removed. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L194 * `Psych` no longer bundles libyaml sources. Users need to install the libyaml library themselves via the package - system. [[Feature #18571]] + system. [[Feature #18571]] ## C API updates diff --git a/README.md b/README.md index 3abbcba810..32392479cb 100644 --- a/README.md +++ b/README.md @@ -15,18 +15,17 @@ It is simple, straightforward, and extensible. https://github.com/ruby/ruby/blob/trunk/README.md#L15 ## Features of Ruby -* Simple Syntax -* **Normal** Object-oriented Features (e.g. class, method calls) -* **Advanced** Object-oriented Features (e.g. mix-in, singleton-method) -* Operator Overloading -* Exception Handling -* Iterators and Closures -* Garbage Collection -* Dynamic Loading of Object Files (on some architectures) -* Highly Portable (works on many Unix-like/POSIX compatible platforms as - well as Windows, macOS, etc.) cf. - https://github.com/ruby/ruby/blob/master/doc/maintainers.rdoc#label-Platform+Maintainers - +* Simple Syntax +* **Normal** Object-oriented Features (e.g. class, method calls) +* **Advanced** Object-oriented Features (e.g. mix-in, singleton-method) +* Operator Overloading +* Exception Handling +* Iterators and Closures +* Garbage Collection +* Dynamic Loading of Object Files (on some architectures) +* Highly Portable (works on many Unix-like/POSIX compatible platforms as + well as Windows, macOS, etc.) cf. + https://github.com/ruby/ruby/blob/master/doc/maintainers.rdoc#label-Platform+Maintainers ## How to get Ruby @@ -60,7 +59,6 @@ Try the following command to see the list of branches: https://github.com/ruby/ruby/blob/trunk/README.md#L59 $ svn ls https://svn.ruby-lang.org/repos/ruby/branches/ - ## Ruby home page https://www.ruby-lang.org/ @@ -90,10 +88,10 @@ is required. https://github.com/ruby/ruby/blob/trunk/README.md#L88 ## How to compile and install -1. If you want to use Microsoft Visual C++ to compile Ruby, read +1. If you want to use Microsoft Visual C++ to compile Ruby, read [win32/README.win32](rdoc-ref:win32/README.win32) instead of this document. -2. Run `./autogen.sh` to generate configure, when you build the source checked +2. Run `./autogen.sh` to generate configure, when you build the source checked out from the Git repository. 3. Run `./configure`, which will generate `config.h` and `Makefile`. @@ -104,7 +102,7 @@ is required. https://github.com/ruby/ruby/blob/trunk/README.md#L102 4. Edit `include/ruby/defines.h` if you need. Usually this step will not be needed. -5. Optional: Remove comment mark(`#`) before the module names from `ext/Setup`. +5. Optional: Remove comment mark(`#`) before the module names from `ext/Setup`. This step is only necessary if you want to link modules statically. @@ -114,16 +112,16 @@ is required. https://github.com/ruby/ruby/blob/trunk/README.md#L112 Usually this step will not be needed. -6. Run `make`. +6. Run `make`. * On Mac, set RUBY\_CODESIGN environment variable with a signing identity. It uses the identity to sign `ruby` binary. See also codesign(1). -7. Optionally, run '`make check`' to check whether the compiled Ruby +7. Optionally, run '`make check`' to check whether the compiled Ruby interpreter works well. If you see the message "`check succeeded`", your Ruby works as it should (hopefully). -8. Run '`make install`'. +8. Run '`make install`'. This command will create the following directories and install files into them. @@ -145,7 +143,6 @@ is required. https://github.com/ruby/ruby/blob/trunk/README.md#L143 * `${DESTDIR}${prefix}/share/man/man1` * `${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system` - If Ruby's API version is '*x.y.z*', the `${MAJOR}` is '*x*', the `${MINOR}` is '*y*', and the `${TEENY}` is '*z*'. diff --git a/spec/README.md b/spec/README.md index 413b9154c9..6b82f8f06a 100644 --- a/spec/README.md +++ b/spec/README.md @@ -5,6 +5,7 @@ spec/bundler is rspec examples for bundler library (`lib/bundler.rb`, `lib/bundl https://github.com/ruby/ruby/blob/trunk/spec/README.md#L5 ## Running spec/bundler To run rspec for bundler: + ```bash make test-bundler ``` @@ -37,6 +38,7 @@ which change behavior or are removed. This is necessary for other Ruby implement https://github.com/ruby/ruby/blob/trunk/spec/README.md#L38 to still be able to run the specs and contribute new specs. For example, change: + ```ruby describe "Some spec" do it "some example" do @@ -44,7 +46,9 @@ describe "Some spec" do https://github.com/ruby/ruby/blob/trunk/spec/README.md#L46 end end ``` + to: + ```ruby describe "Some spec" do ruby_version_is ""..."2.7" do @@ -64,7 +68,8 @@ end https://github.com/ruby/ruby/blob/trunk/spec/README.md#L68 See `spec/ruby/CONTRIBUTING.md` for more documentation about guards. To verify specs are compatible with older Ruby versions: -``` + +```bash cd spec/ruby $RUBY_MANAGER use 2.4.9 ../mspec/bin/mspec -j @@ -73,28 +78,33 @@ $RUBY_MANAGER use 2.4.9 https://github.com/ruby/ruby/blob/trunk/spec/README.md#L78 ## Running ruby/spec To run all specs: + ```bash make test-spec ``` Extra arguments can be added via `MSPECOPT`. For instance, to show the help: + ```bash make test-spec MSPECOPT=-h ``` You can also run the specs in parallel, which is currently experimental. It takes around 10s instead of 60s on a quad-core laptop. + ```bash make test-spec MSPECOPT=-j ``` To run a specific test, add its path to the command: + ```bash make test-spec MSPECOPT=spec/ruby/language/for_spec.rb ``` If ruby trunk is your current `ruby` in `$PATH`, you can also run `mspec` directly: + ```bash # change ruby to trunk ruby -v # => trunk diff --git a/spec/ruby/CONTRIBUTING.md b/spec/ruby/CONTRIBUTING.md index 30941677e0..de6fccbd7e 100644 --- a/spec/ruby/CONTRIBUTING.md +++ b/spec/ruby/CONTRIBUTING.md @@ -13,12 +13,14 @@ Spec are grouped in 5 separate top-level groups: https://github.com/ruby/ruby/blob/trunk/spec/ruby/CONTRIBUTING.md#L13 * `optional/capi`: for functions available to the Ruby C-extension API The exact file for methods is decided by the `#owner` of a method, for instance for `#group_by`: + ```ruby > [].method(:group_by) => #<Method: Array(Enumerable)#group_by> > [].method(:group_by).owner => Enumerable ``` + Which should therefore be specified in `core/enumerable/group_by_spec.rb`. ### MkSpec - a tool to generate the spec structure @@ -220,7 +222,7 @@ If an implementation does not support some feature, simply tag the related specs https://github.com/ruby/ruby/blob/trunk/spec/ruby/CONTRIBUTING.md#L222 ### Shared Specs Often throughout Ruby, identical functionality is used by different methods and modules. In order -to avoid duplication of specs, we have shared specs that are re-used in other specs. The use is a +to avoid duplication of specs, we have shared specs that are re-used in other specs. The use is a bit tricky however, so let's go over it. Commonly, if a shared spec is only reused within its own module, the shared spec will live within a @@ -232,7 +234,7 @@ An example of this is the `shared/file/socket.rb` which is used by `core/file/so https://github.com/ruby/ruby/blob/trunk/spec/ruby/CONTRIBUTING.md#L234 `core/filetest/socket_spec.rb`, and `core/file/state/socket_spec.rb` and so it lives in the root `shared/`. Defining a shared spec involves adding a `shared: true` option to the top-level `describe` block. This -will signal not to run the specs directly by the runner. Shared specs have access to two instance +will signal n (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/