[#70252] Re: [ruby-cvs:58640] nobu:r51492 (trunk): node.c: NODE_ALLOCA for ALLOCV — Eric Wong <normalperson@...>
Besides possible backwards compatibility, can we drop volatile
3 messages
2015/08/05
[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...
Issue #11420 has been reported by Koichi Sasada.
11 messages
2015/08/06
[#70337] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/11
Nice. Thank you guys for looking into this.
[#70349] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
Btw, did you consider using flexible array to avoid extra malloc
[#70355] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Юрий Соколов <funny.falcon@...>
2015/08/12
I thought to suggest to embed hash_id_table directly into places when it is
[#70356] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— SASADA Koichi <ko1@...>
2015/08/12
On 2015/08/13 4:29, Юрий Соколов wrote:
[#70358] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
SASADA Koichi <ko1@atdot.net> wrote:
[#70509] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — ko1@...
Issue #11276 has been updated by Koichi Sasada.
3 messages
2015/08/21
[#70639] the undefined behavior of an iterator if it is modified inside of the block to which it yields — Daniel Doubrovkine <dblock@...>
(this is my first time e-mailing list list, so apologies for any misstep :)
4 messages
2015/08/31
[ruby-core:70470] [Ruby trunk - Bug #11037] Time Parse Documentation Incorrect - Undefined method getlocal
From:
nobu@...
Date:
2015-08-20 05:35:48 UTC
List:
ruby-core #70470
Issue #11037 has been updated by Nobuyoshi Nakada.
Description updated
----------------------------------------
Bug #11037: Time Parse Documentation Incorrect - Undefined method getlocal
https://bugs.ruby-lang.org/issues/11037#change-53874
* Author: Charlie Savage
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x64-mingw32]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
According to:
http://ruby-doc.org/stdlib-2.2.1/libdoc/time/rdoc/Time.html
`Time#parse` can take a 2nd parameter:
> We can change the date used to infer our missing elements by passing a second object that responds to mon, day and year, such as `Date`, `Time` or `DateTime`. We can also use our own object.
However, that is not correct:
~~~ruby
irb(main):010:0> Time.parse('12:30 AM', Date.today)
NoMethodError: undefined method `getlocal' for #<Date: 2015-04-07 ((2457120j,0s,0n),+0s,2299161j)>
from C:/mingw64/mingw64/local/ruby/lib/ruby/2.2.0/time.rb:262:in `make_time'
from C:/mingw64/mingw64/local/ruby/lib/ruby/2.2.0/time.rb:364:in `parse'
from (irb):10
from C:/mingw64/mingw64/local/ruby/bin/irb:11:in `<main>'
~~~
The problem is in `Time#make_time`, lines 259 through 263:
~~~ruby
if off
now = now.getlocal(off) if now.utc_offset != off
else
now = now.getlocal
end
~~~
The behavior the documentation does seem desirable, so the code above should check if the now parameter responds to `getlocal` or not (only `Time` does, `Date` and `DateTime` do not). Or of course the documentation should be updated to specify that a time object must be passed as the now parameter.
---Files--------------------------------
time_parse.patch (1.3 KB)
--
https://bugs.ruby-lang.org/