Aaron Patterson
12544f9422
Merge pull request #13213 from arunagw/aa-minitest-version-fix
...
Minitest upgrade broke build
2013-12-06 10:40:48 -08:00
Xavier Noria
01c9782fa2
better error message for constants autoloaded from anonymous modules [ fixes #13204 ]
...
load_missing_constant is a private method that basically plays the role of const_missing.
This method has an error condition that is surprising: it raises if the class or module
already has the missing constant. How is it possible that if the class of module has
the constant Ruby has called const_missing in the first place?
The answer is that the from_mod argument is self except for anonymous modules, because
const_missing passes down Object in such case (see the comment in the source code of the
patch for the rationale).
But then, it is better to pass down Object *if Object is also missing the constant* and
otherwise err with an informative message right away.
2013-12-06 19:18:10 +01:00
Jeremy Kemper
8ef1ef1b82
Merge pull request #10635 from vipulnsward/change_to_strict
...
Use `Base.strict_decode64` instead of `Base.decode64`
2013-12-06 08:08:28 -08:00
Arun Agrawal
ec00442c10
Minitest upgrade broke build
...
34760e3b26
This PR should fix build
2013-12-06 16:53:14 +01:00
Mario Visic
ffe99774bb
Fix issue with Kernel#silence_stream leaking file descriptors
...
Calling Kernel#silence_stream creates a new file descriptor which isn't
closed after it is used. As a result calling silence_stream multiple
times leads to a build up of loose file descriptors and can cause issues
in environments where garbage collection isn't run often.
2013-12-06 10:24:06 +11:00
Yves Senn
73b57a515f
set i18n.enforce_available_locales
before i18n.default_locale
.
2013-12-05 13:19:51 +01:00
Carlos Antonio da Silva
556ad95b83
Review json_escape docs [ci skip]
2013-12-04 16:11:43 -02:00
Godfrey Chan
0696547814
Also move html_esacpe regex to a constant (see 9d25af60)
2013-12-04 09:46:38 -08:00
Godfrey Chan
2c564cdbdb
Added \u2028 \u2029 to json_escape
2013-12-04 09:43:42 -08:00
Godfrey Chan
c229c7a39c
Use lower case letters in unicodes sequences to match the new encoder's output
2013-12-04 09:27:55 -08:00
Godfrey Chan
2f1c5789c1
Fixed a long-standing bug in json_escape
that strips quotation marks
2013-12-04 09:27:54 -08:00
Kuldeep Aggarwal
8195196e2a
removed duplicate test case
2013-12-04 22:32:53 +05:30
Godfrey Chan
146e95c70d
Backfilled CHANGELOG for AS::JSON::Variable removal (6f3e01e8) [ci skip]
2013-12-03 16:10:06 -08:00
Carlos Antonio da Silva
d5332de379
Remove earlier return in favor of conditional
2013-12-03 20:26:57 -02:00
Carlos Antonio da Silva
59ba94e8a2
Change delimiter check order: first check if it is present
...
This reads a lot better, and we won't need to try start_with? for blank
delimiters.
Also rename method name to read better.
2013-12-03 20:26:57 -02:00
Carlos Antonio da Silva
a63d8cd9e1
Make both conversion methods work similarly
...
The conversion without area code already changed the passed number in
place, so change the other method to do the same.
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
308ed01f14
Remove useless empty string
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
da507b71f6
No need for #tap
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
55afd62f23
Avoid a hash creation since defaults is a new hash already
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
e56a553c95
Stop using local variables everywhere, make use of the reader
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
4e19ef9b25
Refactor to avoid earlier returns
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
72db343334
Rename variable that holds whether or not the class should validate a float number
2013-12-03 20:26:56 -02:00
Carlos Antonio da Silva
7c20a8b558
Changelog improvements [ci skip]
2013-12-03 14:38:12 -02:00
Dimko
18546d4e35
Added Date#all_week/month/quarter/year for generating date ranges
2013-12-03 20:32:20 +04:00
Colin Bartlett
029f24ede9
Add support for localized date references
...
Ruby's Date class automatically gives us #yesterday, #today,
and #tomorrow. And ActiveSupport has a handy Time.zone.today
for getting a localized version. But there was no localized
version of #yesterday or #tomorrow. Until now.
2013-12-03 10:37:01 -05:00
Colin Bartlett
59cb9e31fd
Use travel_to convention in existing test
2013-12-03 10:37:01 -05:00
Carlos Antonio da Silva
c48a0cac62
Tidy up previous commit, fix message assertion and improve tests
2013-12-03 00:15:34 -02:00
Nerian
2ebf47aea2
Modify the Hash#assert_valid_keys error message so that it shows the valid keys. Also, show the wrong value as it was entered.
...
{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: "failore". Valid keys are: :failure, :funny
{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: :failore. Valid keys are: :failure, :funny
Conflicts:
activerecord/CHANGELOG.md
Closes #11624 .
2013-12-03 00:12:04 -02:00
Carlos Antonio da Silva
6e905e21b1
Merge pull request #13060 from chancancode/change_log_for_json_refactor
...
CHANGELOG for JSON refactor + added back the `encode_big_decimal_as_string` option with warning
2013-12-02 17:47:29 -08:00
Godfrey Chan
fadc02b732
Added back the encode_big_decimal_as_string
option with warning
...
Also added the missing CHANGELOG entry for #12183 @ 80e7552073 and
4d02296cfb.
2013-12-02 17:22:57 -08:00
Carlos Antonio da Silva
735abe93a5
Avoid generating more strings while iterating to create methods
...
Use the already existing strings instead of creating a new one each time
just to test if it responds to the methods.
2013-12-02 22:59:40 -02:00
Rafael Mendonça França
46923cabe1
Merge remote-tracking branch 'origin/master'
2013-12-02 22:36:21 -02:00
Rafael Mendonça França
d7d11f0dab
:sicssors:
2013-12-02 22:32:22 -02:00
Rafael Mendonça França
d752ae16ab
Options are not optional
2013-12-02 22:32:21 -02:00
Rafael Mendonça França
5c04ca87d8
Make execute priave API
2013-12-02 22:32:21 -02:00
Rafael Mendonça França
d3b93e403b
Make load of NumberHelper thread safe
2013-12-02 22:12:36 -02:00
Rafael Mendonça França
fc73ebf332
Merge pull request #10996 from mattdbridges/number-helper-refactor
...
Refactor and clean up number helpers
Conflicts:
activesupport/lib/active_support/number_helper.rb
2013-12-02 20:50:03 -02:00
Genadi Samokovarov
6329d9fa8b
Remove deprecated cattr_* requires
2013-12-03 00:28:15 +02:00
Guillermo Iguaran
afbefccf2a
Merge pull request #11197 from gsamokovarov/unify-mattr-cattr
...
Unify cattr and mattr accessors declarations
2013-12-02 14:25:16 -08:00
Rafael Mendonça França
016eb65d7e
✂️
...
[ci skip]
2013-12-02 20:02:06 -02:00
Genadi Samokovarov
7dfbd91b07
Unify cattr and mattr accessors declarations
2013-12-02 23:57:20 +02:00
Daniel Harrington
f046e8a70f
added missing require
...
we’re using .delegate and should require it.
2013-12-02 19:52:01 +01:00
Godfrey Chan
9fbf451872
EscapedString is also private API [ci skip]
2013-12-01 01:58:06 -08:00
Guillermo Iguaran
e8523be4ac
Merge pull request #11796 from thedarkone/time-zone-thread-safety
...
AS::TimeZone's cache thread safety
2013-11-30 23:31:55 -08:00
Rafael Mendonça França
cd4d931659
Merge pull request #13055 from dmitriy-kiriyenko/fix-segmentation-fault-it-ruby-2.0.0-p353
...
Fix segmentation fault in Ruby 2.0.0-p353.
2013-11-30 09:35:29 -08:00
Carlos Antonio da Silva
3bc9c35707
Merge pull request #13111 from akshay-vishnoi/typo
...
Typo fixes [ci skip]
2013-11-30 07:25:00 -08:00
Akshay Vishnoi
e0326f56b4
Typo fixes [ci skip]
2013-11-30 20:27:01 +05:30
Dmitriy Kiriyenko
8033d3370c
Fix segmentation fault in Ruby 2.0.0-p353.
...
In Ruby 2.0.0-p353 there was a
[commit](66915c5077
)
that switched case matching from actual sending `===` method to magic lookup,
that does not see it in `method_missing`. It's hard to predict how exactly and
when exactly this bug will be solved so here I suggest a solution of defining
it in Duration directly.
In Ruby 2.0.0-p353 without the added fix added test crashes to segmentation
fault.
2013-11-30 15:12:12 +02:00
Rafael Mendonça França
c85957ec7c
Merge pull request #13092 from laurocaetano/improve_documentation_for_delegate
...
Improve Module#delegate documentation.
2013-11-29 07:11:19 -08:00
Lauro Caetano
e40ac155ca
Improve Module#delegate documentation to tell that delegate don't work with private or protected methods. [ci skip]
2013-11-29 13:08:52 -02:00