Skip to content

Commit

Permalink
[DOC] Small fixes for documentation rendering
Browse files Browse the repository at this point in the history
Mostly just fixing RDoc's incorrect treatment of `+`
  • Loading branch information
zverok committed Dec 9, 2023
1 parent 1cbe114 commit 07734b5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions cont.c
Expand Up @@ -3272,18 +3272,18 @@ rb_fiber_m_raise(int argc, VALUE *argv, VALUE self)
* call-seq:
* fiber.kill -> nil
*
* Terminates +fiber+ by raising an uncatchable exception.
* It only terminates the given Fiber and no other Fiber, returning +nil+ to
* another Fiber if that Fiber was calling +fiber.resume+ or +fiber.transfer+.
* Terminates the fiber by raising an uncatchable exception.
* It only terminates the given fiber and no other fiber, returning +nil+ to
* another fiber if that fiber was calling #resume or #transfer.
*
* +Fiber#kill+ only interrupts another Fiber when it is in +Fiber.yield+.
* If called on the current Fiber then it raises that exception at the +Fiber#kill+ call site.
* <tt>Fiber#kill</tt> only interrupts another fiber when it is in Fiber.yield.
* If called on the current fiber then it raises that exception at the <tt>Fiber#kill</tt> call site.
*
* If the fiber has not been started, transition directly to the terminated state.
*
* If the fiber is already terminated, does nothing.
*
* Raises +FiberError+ if called on a Fiber belonging to another +Thread+.
* Raises FiberError if called on a fiber belonging to another thread.
*/
static VALUE
rb_fiber_m_kill(VALUE self)
Expand Down
2 changes: 1 addition & 1 deletion dir.c
Expand Up @@ -1322,7 +1322,7 @@ dir_s_fchdir(VALUE klass, VALUE fd_value)
* Dir.pwd # => "/"
* dir = Dir.new('example')
* dir.chdir
* dir.pwd # => "/example"
* Dir.pwd # => "/example"
*
*/
static VALUE
Expand Down
8 changes: 4 additions & 4 deletions error.c
Expand Up @@ -291,11 +291,11 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod)
*
* Changing the behavior of Warning.warn is useful to customize how warnings are
* handled by Ruby, for instance by filtering some warnings, and/or outputting
* warnings somewhere other than $stderr.
* warnings somewhere other than <tt>$stderr</tt>.
*
* If you want to change the behavior of Warning.warn you should use
* +Warning.extend(MyNewModuleWithWarnMethod)+ and you can use `super`
* to get the default behavior of printing the warning to $stderr.
* <tt>Warning.extend(MyNewModuleWithWarnMethod)</tt> and you can use +super+
* to get the default behavior of printing the warning to <tt>$stderr</tt>.
*
* Example:
* module MyWarningFilter
Expand All @@ -312,7 +312,7 @@ rb_warning_s_warn(int argc, VALUE *argv, VALUE mod)
* You should never redefine Warning#warn (the instance method), as that will
* then no longer provide a way to use the default behavior.
*
* The +warning+ gem provides convenient ways to customize Warning.warn.
* The warning[https://rubygems.org/gems/warning] gem provides convenient ways to customize Warning.warn.
*/

static VALUE
Expand Down
14 changes: 7 additions & 7 deletions range.c
Expand Up @@ -2394,14 +2394,14 @@ empty_region_p(VALUE beg, VALUE end, int excl)
* This method assumes that there is no minimum value because
* Ruby lacks a standard method for determining minimum values.
* This assumption is invalid.
* For example, there is no value smaller than +-Float::INFINITY+,
* making +(...-Float::INFINITY)+ an empty set.
* Consequently, +(...-Float::INFINITY)+ has no elements in common with itself,
* yet +(...-Float::INFINITY).overlap?((...-Float::INFINITY))+ returns
* true due to this assumption.
* In general, if +r = (...minimum); r.overlap?(r)+ returns +true+,
* For example, there is no value smaller than <tt>-Float::INFINITY</tt>,
* making <tt>(...-Float::INFINITY)</tt> an empty set.
* Consequently, <tt>(...-Float::INFINITY)</tt> has no elements in common with itself,
* yet <tt>(...-Float::INFINITY).overlap?((...-Float::INFINITY))<tt> returns
* +true+ due to this assumption.
* In general, if <tt>r = (...minimum); r.overlap?(r)</tt> returns +true+,
* where +minimum+ is a value that no value is smaller than.
* Such values include +-Float::INFINITY+, +[]+, +""+, and
* Such values include <tt>-Float::INFINITY</tt>, <tt>[]</tt>, <tt>""</tt>, and
* classes without subclasses.
*
* Related: Range#cover?.
Expand Down

0 comments on commit 07734b5

Please sign in to comment.