| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fixnum#zero?
|
|\ \ \ \ \
| |_|_|/ /
|/| | | |
| | | | | |
Amend `next_week` documentation [ci skip]
|
|/ / / /
| | | |
| | | |
| | | | |
[skip ci]
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | | |
This was not clear on the API documentation that the method was
deprecated in a982a42d766169c2170d7f100c2a5ceb5430efb1.
|
|\ \ \
| | | |
| | | | |
add missing require for ArrayInquirer
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
[ci skip] Fix docs and guide about 'Array.wrap'
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a squash of the following commits, from first to last:
-
Fix minor, random things I’ve come across lately that individually
did not seem worth making a PR for, so I saved them for one commit.
One common error is using “it’s” (which is an abbreviation of “it is”)
when the possessive “its” should be used for indicating possession.
-
Changes include the name of a test, so remove the `[skip ci]` (thanks @senny).
-
Line wrap the changes at 80 chars and add one more doc fix.
-
Add a missing line wrap in the Contributing to Ruby on Rails Guide.
-
Line wrap the `TIP` section in the Contributing to Ruby on Rails Guide as well.
Rendering the guide locally with `bundle exec rake guides:generate` did
not show any change in on-screen formatting after adding the line wrap.
The HTML generated is (extra line added to illustrate where the line
wrap takes place):
<div class="info"><p>Please squash your commits into a single commit
when appropriate. This
simplifies future cherry picks and also keeps the git log
clean.</p></div>
-
Squash commits.
|
| | | |
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In dev, ActiveSupport::FileUpdateChecker#max_mtime triggers many
time comparisons. Time#to_time is quite a bit slower than not doing it,
so we should avoid it if possible.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 9420de59f5b7f5ceac77e28e6c326ec145f71f80.
Reason: Turns out we want to keep this method.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We are promoting too much a feature that will not be widler used.
So for now lets keep just the ArrayInquirer constructor.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Provide friendlier access to request variants
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Wrapping an array in an `ArrayInquirer` gives a friendlier way to check its
string-like contents. For example, `request.variant` returns an `ArrayInquirer`
object. To check a request's variants, you can call:
request.variant.phone?
request.variant.any?(:phone, :tablet)
...instead of:
request.variant.include?(:phone)
request.variant.any? { |v| v.in?([:phone, :tablet]) }
`Array#inquiry` is a shortcut for wrapping the receiving array in an
`ArrayInquirer`:
pets = [:cat, :dog]
pets.cat? # => true
pets.ferret? # => false
pets.any?(:cat, :ferret} # => true
|
| |/ / /
|/| | | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
Conflicts:
guides/source/4_0_release_notes.md
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | | |
…as discussed #19413
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Thanks @fbernier for suggestion! <3
At this moment we can use Module#prepend in all all cases
except of Range because of the bug [1] in MRI 2.2
[1] https://bugs.ruby-lang.org/issues/10847
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Fix a few typos
* Wrap some lines around 80 chars
* Rephrase some statements
|
| | | |
| | | |
| | | |
| | | | |
(relates to #19157)
|
| | | |
| | | |
| | | |
| | | | |
[egilburg]
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
tgxworld/reduce_allocated_memory_in_module_delegate
Reduce allocated memory for Module#delegate.
|
| | | | |
|
| | | | |
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Update documentation examples for String#remove [skip ci]
|
|/ / / |
|
| | |
| | |
| | |
| | | |
Fixes #19070.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`coder.represent_scalar` means something along the lines of "Here is a quoted
string, you can just add it to the output", which is not the case here. It only
works for simple strings that can appear unquoted in YAML, but causes problems
for e.g. primitive-like strings ("1", "true").
`coder.represent_object` on the other hand, means that "This is the Ruby-object
representation for this thing suitable for use in YAML dumping", which is what
we want here.
Before:
YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello"
YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => true
YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => false
YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => 1
YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => 1.1
After:
YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello"
YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => "true"
YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => "false"
YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => "1"
YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => "1.1"
If we ever want Ruby to behave more like PHP or JavaScript though, this is an
excellent trick to use ;)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This caused a performance regression since we were decided to do the nil
check in run time not in the load time.
See https://github.com/rails/rails/pull/15187#issuecomment-71760058
|
| | |
| | |
| | |
| | |
| | |
| | | |
NameError#name returns a missing name as a symbol, so if the given name
is a symbol, it doesn't have to use #missing_name to get the last constant
name in the error message.
|