Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/digest/lib/digest/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

module Digest
# The version string
VERSION = "3.2.1"
end
1 change: 1 addition & 0 deletions ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,7 @@ rb_zstream_finish(VALUE obj)
* call-seq:
* flush_next_in -> input
*
* Flushes input buffer and returns all data in that buffer.
*/
static VALUE
rb_zstream_flush_next_in(VALUE obj)
Expand Down
1 change: 0 additions & 1 deletion gem_prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
rescue LoadError
warn "`syntax_suggest' was not loaded."
end if defined?(SyntaxSuggest)

5 changes: 5 additions & 0 deletions lib/bundled_gems.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# -*- frozen-string-literal: true -*-

# :stopdoc:
module Gem
end
# :startdoc:

module Gem::BUNDLED_GEMS # :nodoc:
SINCE = {
"racc" => "3.3.0",
Expand Down
4 changes: 1 addition & 3 deletions lib/bundler/ruby_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def initialize(versions, patchlevel, engine, engine_version)

def to_s(versions = self.versions)
output = String.new("ruby #{versions_string(versions)}")
output << "p#{patchlevel}" if patchlevel && patchlevel != "-1"
output << " (#{engine} #{versions_string(engine_versions)})" unless engine == "ruby"

output
Expand Down Expand Up @@ -72,8 +71,7 @@ def single_version_string
def ==(other)
versions == other.versions &&
engine == other.engine &&
engine_versions == other.engine_versions &&
patchlevel == other.patchlevel
engine_versions == other.engine_versions
end

def host
Expand Down
19 changes: 10 additions & 9 deletions lib/delegate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# Be advised, RDoc will not detect delegated methods.
#
class Delegator < BasicObject
# The version string
VERSION = "0.4.0"

kernel = ::Kernel.dup
Expand Down Expand Up @@ -77,7 +78,7 @@ def initialize(obj)
end

#
# Handles the magic of delegation through \_\_getobj\_\_.
# Handles the magic of delegation through +__getobj__+.
#
ruby2_keywords def method_missing(m, *args, &block)
r = true
Expand All @@ -94,7 +95,7 @@ def initialize(obj)

#
# Checks for a method provided by this the delegate object by forwarding the
# call through \_\_getobj\_\_.
# call through +__getobj__+.
#
def respond_to_missing?(m, include_private)
r = true
Expand All @@ -107,7 +108,7 @@ def respond_to_missing?(m, include_private)
r
end

KERNEL_RESPOND_TO = ::Kernel.instance_method(:respond_to?)
KERNEL_RESPOND_TO = ::Kernel.instance_method(:respond_to?) # :nodoc:
private_constant :KERNEL_RESPOND_TO

# Handle BasicObject instances
Expand All @@ -126,23 +127,23 @@ def respond_to_missing?(m, include_private)

#
# Returns the methods available to this delegate object as the union
# of this object's and \_\_getobj\_\_ methods.
# of this object's and +__getobj__+ methods.
#
def methods(all=true)
__getobj__.methods(all) | super
end

#
# Returns the methods available to this delegate object as the union
# of this object's and \_\_getobj\_\_ public methods.
# of this object's and +__getobj__+ public methods.
#
def public_methods(all=true)
__getobj__.public_methods(all) | super
end

#
# Returns the methods available to this delegate object as the union
# of this object's and \_\_getobj\_\_ protected methods.
# of this object's and +__getobj__+ protected methods.
#
def protected_methods(all=true)
__getobj__.protected_methods(all) | super
Expand Down Expand Up @@ -175,7 +176,7 @@ def eql?(obj)
end

#
# Delegates ! to the \_\_getobj\_\_
# Delegates ! to the +__getobj__+
#
def !
!__getobj__
Expand All @@ -198,7 +199,7 @@ def __setobj__(obj)
end

#
# Serialization support for the object returned by \_\_getobj\_\_.
# Serialization support for the object returned by +__getobj__+.
#
def marshal_dump
ivars = instance_variables.reject {|var| /\A@delegate_/ =~ var}
Expand Down Expand Up @@ -232,7 +233,7 @@ def initialize_dup(obj) # :nodoc:

##
# :method: freeze
# Freeze both the object returned by \_\_getobj\_\_ and self.
# Freeze both the object returned by +__getobj__+ and self.
#
def freeze
__getobj__.freeze
Expand Down
1 change: 0 additions & 1 deletion lib/erb/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ def initialize from
end
}.new(caller(0)).c
private_constant :WARNING_UPLEVEL
# :startdoc:

def warn_invalid_trim_mode(mode, uplevel:)
warn "Invalid ERB trim mode: #{mode.inspect} (trim_mode: nil, 0, 1, 2, or String composed of '%' and/or '-', '>', '<>')", uplevel: uplevel + WARNING_UPLEVEL
Expand Down
1 change: 1 addition & 0 deletions lib/erb/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# A subset of ERB::Util. Unlike ERB::Util#html_escape, we expect/hope
# Rails will not monkey-patch ERB::Escape#html_escape.
module ERB::Escape
# :stopdoc:
def html_escape(s)
CGI.escapeHTML(s.to_s)
end
Expand Down
1 change: 1 addition & 0 deletions lib/find.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#
module Find

# The version string
VERSION = "0.2.0"

#
Expand Down
2 changes: 2 additions & 0 deletions lib/forwardable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ module Forwardable
# Version of +forwardable.rb+
VERSION = "1.3.3"
VERSION.freeze

# Version for backward compatibility
FORWARDABLE_VERSION = VERSION
FORWARDABLE_VERSION.freeze

Expand Down
10 changes: 8 additions & 2 deletions lib/open-uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ def self.open(name, *rest, &block)

module OpenURI

# The version string
VERSION = "0.5.0"

# The default options
Options = {
:proxy => true,
:proxy_http_basic_authentication => true,
Expand Down Expand Up @@ -394,24 +396,28 @@ def OpenURI.open_http(buf, target, proxy, options) # :nodoc:
end
end

# Raised on HTTP session failure
class HTTPError < StandardError
def initialize(message, io)
def initialize(message, io) # :nodoc:
super(message)
@io = io
end
# StringIO having the received data
attr_reader :io
end

# Raised on redirection,
# only occurs when +redirect+ option for HTTP is +false+.
class HTTPRedirect < HTTPError
def initialize(message, io, uri)
def initialize(message, io, uri) # :nodoc:
super(message, io)
@uri = uri
end
# URI to redirect
attr_reader :uri
end

# Raised on too many redirection,
class TooManyRedirects < HTTPError
end

Expand Down
1 change: 1 addition & 0 deletions lib/open3/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module Open3
# The version string
VERSION = "0.2.1"
end
4 changes: 2 additions & 2 deletions lib/pp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def pop_inspect_key(id)
Thread.current[:__recursive_key__][:inspect].delete id
end

private def guard_inspect(object)
private def guard_inspect(object) # :nodoc:
recursive_state = Thread.current[:__recursive_key__]

if recursive_state&.key?(:inspect)
Expand Down Expand Up @@ -277,7 +277,7 @@ def seplist(list, sep=nil, iter_method=:each) # :yield: element
kwsplat ? yield(*v, **kwsplat) : yield(*v)
}
end
EMPTY_KWHASH = if RUBY_VERSION >= "3.0"
EMPTY_KWHASH = if RUBY_VERSION >= "3.0" # :nodoc:
{}.freeze
end
private_constant :EMPTY_KWHASH
Expand Down
1 change: 1 addition & 0 deletions lib/prettyprint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#
class PrettyPrint

# The version string
VERSION = "0.2.0"

# This is a convenience method which is same as follows:
Expand Down
2 changes: 2 additions & 0 deletions lib/rubygems/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,8 @@ def verify
raise Gem::Package::FormatError.new e.message, @gem
end

private

##
# Verifies the +checksums+ against the +digests+. This check is not
# cryptographically secure. Missing checksums are ignored.
Expand Down
11 changes: 6 additions & 5 deletions lib/singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@
# p a.strip # => nil
#
module Singleton
# The version string
VERSION = "0.3.0"

module SingletonInstanceMethods
module SingletonInstanceMethods # :nodoc:
# Raises a TypeError to prevent cloning.
def clone
raise TypeError, "can't clone instance of singleton #{self.class}"
Expand Down Expand Up @@ -143,11 +144,11 @@ def set_mutex(val)
end
end

def self.module_with_class_methods
def self.module_with_class_methods # :nodoc:
SingletonClassMethods
end

module SingletonClassProperties
module SingletonClassProperties # :nodoc:

def self.included(c)
# extending an object with Singleton is a bad idea
Expand Down Expand Up @@ -196,10 +197,10 @@ def included(klass)
end

if defined?(Ractor)
module RactorLocalSingleton
module RactorLocalSingleton # :nodoc:
include Singleton::SingletonInstanceMethods

module RactorLocalSingletonClassMethods
module RactorLocalSingletonClassMethods # :nodoc:
include Singleton::SingletonClassMethods
def instance
set_mutex(Thread::Mutex.new) if Ractor.current[mutex_key].nil?
Expand Down
2 changes: 2 additions & 0 deletions lib/tempfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ def Tempfile.create(basename="", tmpdir=nil, mode: 0, anonymous: false, **option
end

class << Tempfile
# :stopdoc:

private def create_with_filename(basename="", tmpdir=nil, mode: 0, **options)
tmpfile = nil
Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts|
Expand Down
1 change: 1 addition & 0 deletions lib/weakref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#

class WeakRef < Delegator
# The version string
VERSION = "0.1.4"

##
Expand Down
1 change: 1 addition & 0 deletions lib/yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@
#
# Syck can also be found on github: https://github.com/ruby/syck
module YAML
# The version of YAML wrapper
LOADER_VERSION = "0.4.0"
end
10 changes: 2 additions & 8 deletions spec/bundler/bundler/ruby_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

describe "#to_s" do
it "should return info string with the ruby version, patchlevel, engine, and engine version" do
expect(subject.to_s).to eq("ruby 2.0.0p645 (jruby 2.0.1)")
expect(subject.to_s).to eq("ruby 2.0.0 (jruby 2.0.1)")
end

context "no patchlevel" do
Expand All @@ -115,7 +115,7 @@
let(:engine) { "ruby" }

it "should return info string with the ruby version and patchlevel" do
expect(subject.to_s).to eq("ruby 2.0.0p645")
expect(subject.to_s).to eq("ruby 2.0.0")
end
end

Expand Down Expand Up @@ -149,12 +149,6 @@
it_behaves_like "two ruby versions are not equal"
end

context "the patchlevels do not match" do
let(:other_patchlevel) { "21" }

it_behaves_like "two ruby versions are not equal"
end

context "the engines do not match" do
let(:other_engine) { "ruby" }

Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/install/gemfile/ruby_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def locked_ruby_version
myrack

RUBY VERSION
ruby 2.1.4p422
ruby 2.1.4

BUNDLED WITH
#{Bundler::VERSION}
Expand Down
Loading