Activity
From 05/02/2017 to 05/08/2017
05/08/2017
-
06:55 PM Bug #13549 (Closed): MinGW / Windows encoding - Two issues
- ## Issue #1
The documentation for [Encoding.default_internal=](https://msp-greg.github.io/ruby_trunk/Core/Encoding.html#default_external=-class_method) states:
"The locale encoding (\_\_ENCODING\_\_), not default_internal, is used ... -
04:29 PM Bug #13503: Improve performance of some Time & Rational methods
- normalperson (Eric Wong) wrote:
> Maybe CPU and compiler differences can account for this.
> ...
I have used MacBook Pro (Retina, 15-inch, Late 2013) and my enviroment is
* OS : macOS 10.12.4
* CPU : Intel Core i7 2.6 GHz
* Compi... -
04:07 PM Bug #13548: miniruby SEGV while building with non-default CFLAGS (caused by __builtin_setjmp)
- Forgot to say, the same happens too with more popular
~~~
CFLAGS="-O3 -funroll-loops -g"
~~~
And the cause of the issue (in the backtrace attached) is not rb_str_buf_cat2+0x39, but is rb_require_internal+0x6ba (or even lower).
-
03:53 PM Bug #13548 (Closed): miniruby SEGV while building with non-default CFLAGS (caused by __builtin_setjmp)
- Trying to build ruby-2.4.1 using gcc-5.4.0 I get the attached error. Just-released gcc-7.1.0 causes the similar error. Old gcc-4.8.4 builds successfully.
The build command is:
~~~
CFLAGS="-O1 -fweb -g" LDFLAGS=-g ./configure --ena... - 04:00 PM Revision f94b7bce (git): * 2017-05-09
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
04:00 PM Revision 0a1debb8 (git): Add mspec and rubyspec to LEGAL [ci skip]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
01:29 PM Bug #13547 (Closed): [].delete 1 { 'NG' }
- Is this intentional?
```
% ruby --dump=parsetree -vwce "x 1 { 2 }"
ruby 2.5.0dev (2017-05-08 trunk 58609) [x86_64-darwin15]
Syntax OK
###########################################################
## Do NOT use this node dump for an... -
01:14 PM Revision 15196f4c (git): Translate missing rdoc comment for opt_send_without_block.
- fix [GH-1608], Patch by @k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
08:00 AM Bug #13535: Installing Ruby2.4.1 on Solaris 10
- ご対応いただきありがとうございます。
日本語で再度質問させてください。
makeまでに実行したコマンドは以下の通りです。
ruby-2.4.1.tar.gzを/opt/oracle/media/Ruby/にインストール
#cd /opt/oracle/media/Ruby/
#gunzip -c ruby-2.4.1.tar.gz | tar xvf -
#cd ruby-2.4.1
#PATH+$PATH:/usr/sfw/bin
#./c... -
06:08 AM Bug #13535 (Feedback): Installing Ruby2.4.1 on Solaris 10
- usukere (高橋 佑典) wrote:
> ```
> ...
It is makefile for GNU make.
> ```
> ...
But this command in the parent makefile is for non-GNU make.
This is controled by `gnumake` makefile variable and should be
consistent.
> Could you te... -
03:23 AM Bug #13535: Installing Ruby2.4.1 on Solaris 10
- Thank you, We're installing ver2.4.1 in Solaris 10.
But DIfferent problems happened.
```
make: Fatal error: Unknown option `-C'
***Error Code 1
The following command caused the error:
make -C libffi-3.2.1
make: Fatal error: comm... -
05:31 AM Revision ebbe6782 (git): separate constdefs.c and constdefs.h
- * ext/socket/depend: separate constdefs.c and constdefs.h so that
only one process will run when parallel building.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:59 AM
Feature #10341 (Closed): Fiber switch performance improvements
- Applied in changeset trunk|r58606.
----------
benchmark/bm_vm2_fiber_switch.rb: check for fiber performance
There are currently no benchmarks for Fiber performance, I
should've committed this years ago when [Feature #10341] was
impleme... - 01:59 AM Revision 774420eb (git): reduce rb_mutex_t size from 80 bytes to 72 bytes on 64-bit
- We can use existing RVALUE flags to avoid adding a 4-byte
integer to store a boolean flag. This integer cost us 8 bytes
due to default (lack of) struct packing on x86-64
* thread_sync.c (MUTEX_ALLOW_TRAP): define as FL_USER1
(struct ... - 01:59 AM Revision cdc85aec (git): * properties.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 01:59 AM Revision 60473fe0 (git): benchmark/bm_vm2_fiber_switch.rb: check for fiber performance
- There are currently no benchmarks for Fiber performance, I
should've committed this years ago when [Feature #10341] was
implemented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:18 AM
Feature #13517 (Closed): [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- Applied in changeset trunk|r58604.
----------
reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
Instead of relying on a native condition variable and mutex for
every Ruby Mutex object, use a doubly linked-list to implement a
waiter... - 12:18 AM Revision 153aa5af (git): * 2017-05-08
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 12:18 AM Revision 3586c9e0 (git): reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- Instead of relying on a native condition variable and mutex for
every Ruby Mutex object, use a doubly linked-list to implement a
waiter queue in the Mutex. The immediate benefit of this is
reducing the size of every Mutex object, as som...
05/07/2017
-
11:41 PM Feature #13517: [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- On 2017/05/08 8:08, Eric Wong wrote:
> Back to your original question. THREAD_RUNNABLE is possible
> if somebody uses Thread#run:
>
> require 'thread'
> m = Mutex.new
> th = Thread.new do
> sleep 0.1 # wait fo... -
11:11 PM Feature #13517: [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- SASADA Koichi <[email protected]> wrote:
> sorry for late response.
> I have no objection about this patch. thank you.
>
> one question.
>
> ```
> list_for_each_safe(&mutex->waitq, cur, next, node) {
> list_del_init(&cur->no... -
07:08 PM Feature #13517: [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- sorry for late response.
I have no objection about this patch. thank you.
one question.
```
list_for_each_safe(&mutex->waitq, cur, next, node) {
list_del_init(&cur->node);
switch (cur->th->state) {
case THREAD... -
03:17 PM Bug #13542: MinGW trunk Builds - Summary of Issues
- Saturday, I ran spec/mspec for the first time in a while, and today it was added to the ruby repo. I'm having some issues integrating it into the build environment, but the following is the output from running `mspec :core` and `mspec :...
-
02:21 PM Revision 7dae53f3 (git): relative path as VPATH
- * common.mk (ripper.c): use relative path as VPATH instead of
absolute path of the current working directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:03 PM Revision ac08e59b (git): parse.y: export rb_parser_fatal for ripper
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
01:40 PM Revision fd6853a2 (git): stale targets
- * common.mk (update-mspec, update-rubyspec): empty stale targets.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:06 PM Revision 987508ce (git): extract prereq.status
- * tool/make-snapshot (package): extract static config values for
prereq and override dynamic values at runtime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:36 PM Feature #13156: In-tree copy of ruby/spec
- I finally got around adding the in-tree copy of ruby/spec, sorry for the delay.
Dear MRI committers, you can now directly edit specs under spec/rubyspec like any other file in the repository.
Your changes there and new specs are very... -
12:05 PM Feature #13156 (Closed): In-tree copy of ruby/spec
- Applied in changeset trunk|r58595.
----------
Add in-tree mspec and ruby/spec
* For easier modifications of ruby/spec by MRI developers.
* .gitignore: track changes under spec.
* spec/mspec, spec/rubyspec: add in-tree mspec and ruby/sp... -
12:26 PM Revision a319225b (git): Update specs to follow newlines added by r58596
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:17 PM Revision e7ec88a4 (git): Rename spec/README to spec/README.md
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 12:05 PM Revision 7f9cd733 (git): * properties.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 12:05 PM Revision 6bc742bc (git): * remove trailing spaces, append newline at EOF.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:04 PM Revision 95e8c48d (git): Add in-tree mspec and ruby/spec
- * For easier modifications of ruby/spec by MRI developers.
* .gitignore: track changes under spec.
* spec/mspec, spec/rubyspec: add in-tree mspec and ruby/spec.
These files can therefore be updated like any other file in MRI.
Instruc... -
12:01 PM Revision ed7d8035 (git): make update-rubyspec is no longer needed
- * Kept a no-op for compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:01 PM Revision 538dcb30 (git): Update README about ruby/spec
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:00 PM Revision e9628d97 (git): * spec/default.mspec: only require rbconfig if is it not already.
- Useful when running spec/mspec/bin/mspec directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 08:06 AM Revision 95f13596 (git): vm_core.h (rb_thread_t): use 32-bit running_time_us
- The current range based current values of:
TIME_QUANTUM_USEC=100000
RUBY_THREAD_PRIORITY_MAX=3
RUBY_THREAD_PRIORITY_MIN=-3
Gives a range of 12500..800000, plenty enough for a 32-bit
integer. Clamping this also ... - 07:38 AM Revision b1bb2520 (git): io.c (do_fcntl): update max FD for F_DUPFD_CLOEXEC, too
- Somebody may pass 1030 (the value of F_DUPFD_CLOEXEC) to IO#fcntl
because they copied code from somewhere else. Ensure we know
about FDs created that way.
* io.c (do_fcntl): update max FD for F_DUPFD_CLOEXEC, too
git-svn-id: svn+ssh:/... -
07:18 AM Revision a0da5141 (git): NEWS: Integer#{round,floor,ceil,truncate} [Bug #13420]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
06:02 AM Bug #13526: Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
- [email protected] wrote:
> normalperson (Eric Wong) wrote:
> > OK, committed as r58587 with that script.
>
> Thank you!
> It works perfectly as far as I can see.
Thank you for confirming. Your small reproduction script was
... -
05:41 AM Bug #13526: Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
- normalperson (Eric Wong) wrote:
> OK, committed as r58587 with that script.
Thank you!
It works perfectly as far as I can see.
> ...
Sorry. I've commented by Redmine with my web browser, so I could not Cc: you.
So I add you as ... -
04:31 AM Bug #13526: Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
- Eric Wong <[email protected]> wrote:
> [email protected] wrote:
> > `git bisect` shows that this issue is appeared at r52332 [Bug #11384].
> >
> > I ran https://bugs.ruby-lang.org/issues/13526#note-1 script with attached debug... -
04:26 AM
Bug #13526 (Closed): Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
- Applied in changeset trunk|r58587.
----------
variable.c: cleanup waitq upon thread death
* variable.c (autoload_reset): use idempotent list_del_init
(autoload_sleep): moved code from rb_autoload_load
(autoload_sleep_done): cleanup... -
03:51 AM Bug #13526: Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
- [email protected] wrote:
> `git bisect` shows that this issue is appeared at r52332 [Bug #11384].
>
> I ran https://bugs.ruby-lang.org/issues/13526#note-1 script with attached debug-print patch and got the log.
Thank you! Fix c... -
02:44 AM Bug #13526: Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
- `git bisect` shows that this issue is appeared at r52332 [Bug #11384].
I ran https://bugs.ruby-lang.org/issues/13526#note-1 script with attached debug-print patch and got the log.
1. Thread 0x000055eacc7089d0 had "waitq: 0x7f737581... - 04:26 AM Revision 8451d3c7 (git): * properties.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 04:26 AM Revision c7ff36c6 (git): variable.c: cleanup waitq upon thread death
- * variable.c (autoload_reset): use idempotent list_del_init
(autoload_sleep): moved code from rb_autoload_load
(autoload_sleep_done): cleanup for use with rb_ensure
(rb_autoload_load): ensure list delete happens in case the
threa... -
03:33 AM Bug #13546 (Feedback): std steams are closed in Windows app.
- Do you call `ruby_sysinit`?
05/06/2017
-
10:48 PM Bug #13546 (Rejected): std steams are closed in Windows app.
- We are embedding Ruby VM into a windows app ( msvc2015 CRT ). VM fails to initialize in `Init_IO` with 'closed stream', when initing stdin, stdout and stderr. Debugging shows that `fileno()` call for stdin and stderr returns -2 value and...
-
10:13 PM Feature #13518: Indented multiline comments
- duerst (Martin Dürst) wrote:
> `=begin`/`=end` are rare, and it's better to make them stick out.
I would make the case that `=begin`/`=end` is rare because it can't be indented. Multiline comments are very handy. It makes syntax high... -
08:38 PM Feature #13420: Integer#{round,floor,ceil,truncate} should always return an integer, not a float
- stomar (Marcus Stollsteimer) wrote:
> Applied.
> ...
Thanks!
> Should I add a comment in `NEWS` or not?
Yes, I think the rule is to add a NEWS entry for every user-visible behavior change. -
08:16 PM Feature #13420: Integer#{round,floor,ceil,truncate} should always return an integer, not a float
- Applied.
I opened a PR for the specs: https://github.com/ruby/spec/pull/436 _[merged]_
Should I add a comment in `NEWS` or not? _[done]_
-
07:58 PM Feature #13420 (Closed): Integer#{round,floor,ceil,truncate} should always return an integer, not a float
- Applied in changeset trunk|r58586.
----------
make Integer#{round,floor,ceil,truncate} always return integer
* numeric.c (int_round): return integer (self) instead of float
for Integer#round with positive ndigits argument, because
... -
01:19 AM Feature #13420 (Assigned): Integer#{round,floor,ceil,truncate} should always return an integer, not a float
- stomar (Marcus Stollsteimer) wrote:
> nobu, does this mean "Nice. Go ahead and apply!"?
Yes, of course.
> ...
Indeed, it needs a version guard.
-
07:58 PM Revision f495fe4f (git): make Integer#{round,floor,ceil,truncate} always return integer
- * numeric.c (int_round): return integer (self) instead of float
for Integer#round with positive ndigits argument, because
conversion to float introduces errors for large integers.
* numeric.c (int_floor): ditto for Integer#floor.
* n... -
03:15 PM Bug #13536 (Closed): Ripper fails to tokenize nested squiggly heredoc
- Applied in changeset trunk|r58584.
----------
ripper/lexer.rb: nested indented heredoc
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert
stripped leading spaces as `on_ignored_sp` elements, so that the
original source ca... - 03:14 PM Revision 7c0dcecb (git): * 2017-05-07
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:14 PM Revision 4671737b (git): ripper/lexer.rb: nested indented heredoc
- * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert
stripped leading spaces as `on_ignored_sp` elements, so that the
original source can be reconsructed.
[ruby-core:80977] [Bug #13536]
git-svn-id: svn+ssh://ci.ruby-lang.o... -
02:12 PM Revision 8727dce2 (git): fix up r58573
- * common.mk: make the directory for extension shared library with
the timestamp directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
07:28 AM Revision 4b5a2b52 (git): math.c: improve docs for Math.sqrt
- * math.c: [DOC] mention Integer.sqrt in docs for Math.sqrt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
07:18 AM Revision 5e58811b (git): numeric.c: remove mention of Bignum from docs
- * numeric.c: [DOC] remove mention of Bignum from Integer#{+,-,*,/},
the return type does not depend on magnitude anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
07:17 AM Revision f280556f (git): numeric.c: revise docs
- * numeric.c: [DOC] revise docs for Numeric, Integer, Float:
* nodoc Numeric#singleton_method_added
* mention that result for Integer#** might also be Complex
* add / simplify / fix some examples
* mention aliases
* fix rdoc for... -
04:42 AM Revision f8676697 (git): delete enc/prelude.rb, because no longer needed
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:12 AM Revision c7baa31c (git): delete lib/unicode_normalize.rb, because no longer needed
- (all content has been moved to string.c)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:54 AM Revision 0324e76d (git): remove enc/prelude.rb from list of prelude files in common.mk
- (This is a retry of r58559, it should work now that rubyspec does
no longer check for unicode_normalized to be required. See also
https://github.com/ruby/spec/commit/41176ead68b14011658c8abd0ebd67df2ae632fb.)
git-svn-id: svn+ssh://ci.ru... -
01:33 AM Bug #13539 (Closed): uninitialized class variable @@accept_charset in #<Class:CGI> when calling CGI.unescape
- Applied in changeset trunk|r58576.
----------
share `@@accept_charset`
* lib/cgi/{core,util}.rb: include CGI::Util not only extending, to
share `@@accept_charset` class variable, so that it is always
accessible. [ruby-core:80986] ... -
01:33 AM Revision 97849e11 (git): share `@@accept_charset`
- * lib/cgi/{core,util}.rb: include CGI::Util not only extending, to
share `@@accept_charset` class variable, so that it is always
accessible. [ruby-core:80986] [Bug #13539]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58576 b2d... -
01:01 AM Revision d7f2c723 (git): string.c: fix types
- * string.c (id_normalize, id_normalized_p): fix types, IDs should
be ID.
* string.c (unicode_normalize_common): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 12:54 AM Revision 4566365d (git): * 2017-05-06
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:54 AM Revision 6b4fc043 (git): timestamp for extensions
- * common.mk: use the same timestamp file for architecture specific
directory as the file used in Makefiles under ext.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:15 AM Bug #13543 (Rejected): local variable declaration
- As far as I understand, the detection of variables (and as a consequence the shadowing of methods with the same name) occurs in lexical order. That means that because in
```
foo = foo.size
```
the variable name comes before the m...
05/05/2017
-
02:16 PM Bug #13543: local variable declaration
- true, the parser detects the local variable early on, but it does not ignore the method until the point of assignment:
~~~ ruby
def foo
@foo ||= "foo"
end
p local_variables #=> [:foo]
p foo.size #=> 3
foo = foo.size #=> ... -
07:25 AM Bug #13543: local variable declaration
- the problem: the parser does find: `foo = foo.size`
and detect that foo is a local variable, and does ignore it was defined as method before.
this can be shown in the code below:
~~~ ruby
def foo
@foo ||= "foo"
end
def tes... -
01:34 PM Feature #13420: Integer#{round,floor,ceil,truncate} should always return an integer, not a float
- nobu, does this mean "Nice. Go ahead and apply!"?
(I fear I'm not too familiar with the ways around here, yet.)
And I noticed that while Integer#{floor,ceil,truncate} accept an `ndigits` argument only since recently (Ruby 2.4), Int... -
09:19 AM Bug #13536 (Open): Ripper fails to tokenize nested squiggly heredoc
- Thank you, the exception disappeared.
But it seems incomplete. Look at this slightly different example:
```
require 'ripper'
str = \
<<~'end'
<<~"do"
#{
<<~"begin"
this must be a valid ruby
begin
}
do
end
puts eval(... -
07:48 AM Bug #11078: 2.2 String#unicode_normalize method does not appear in generated API docs
- @duerst (Martin Dürst):
i see your changes with unicode_normalize_common,
i only asking because i think that rb_scan_args would be better for that, because:
1. it does check for the args better
1. also it might be easier to use r... -
12:35 AM Bug #13545 (Closed): Ruby built by clang 4.0.0 parses Float literal wrongly
- ~~~
$ ./configure --prefix=/home/mame/work/local CC=clang
$ make -j 4 miniruby
$ ./miniruby -e 'p 1.1851510441583988e+30'
1.1851510441583981e+30
~~~
See the last digit. While the original literal ends with "8e+30", the result en... -
12:32 AM Feature #13544: Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE
- On 2017/05/05 5:36, Eric Wong wrote:
> Maybe adding mmap support (at least read-only) to IO objects can
> support this...
FYI:
https://github.com/ko1/yomikomu gem use mmap
(https://github.com/ko1/mmapped_string).
(but no big imp... -
12:16 AM Misc #13541: [PATCH] test/thread: relax checks for internal implementation
- It seems no problem.
I think you can write that this change is related to "error message" in commit log (dependencies caused by error message). Because I can't imagine these dependencies with your report (this ticket) before I check y...
05/04/2017
-
08:41 PM Feature #13544: Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE
- [email protected] wrote:
> https://bugs.ruby-lang.org/issues/13544
> Currently the only way to load an InstructionSequence is to load the data into a Ruby RVALUE and then pass it to #load_from_binary
>
> This is inefficient a... -
08:39 PM Feature #13544 (Closed): Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE
- I agree. mruby has such feature and CRuby also should implement it.
For example, we should use it for rubygems and didyoumean gem which loaded at all load-time.
I close it and will make new ticket when I (or someone smart) make this ... -
06:35 PM Feature #13544 (Closed): Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE
- Currently the only way to load an InstructionSequence is to load the data into a Ruby RVALUE and then pass it to #load_from_binary
This is inefficient as it forces one extra potentially very large RVALUE slot.
It would be nice if ... -
06:08 PM Bug #13543 (Rejected): local variable declaration
- The following code snippet generates a strange error:
~~~ ruby
def foo
@foo ||= "foo"
end
foo = foo.size
#=> undefined method 'size' for nil:NilClass (NoMethodError)
~~~
I expect the code to create a local variable `foo... - 04:47 PM Revision cf1844f9 (git): * 2017-05-05
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 04:47 PM Revision 1267dad8 (git): benchmark/bm_vm_thread_pass_flood.rb: add comment
- I was about to write off this benchmark while working on GVL
improvements on multi-core systems.
However I noticed it exposes a weakness in my work-in-progress
code when I tested on an old single CPU system. Further testing
reveals set... -
04:33 PM Bug #13542 (Closed): MinGW trunk Builds - Summary of Issues
- It appears that 64 bit MinGW trunk build results in `test-all` are stable . The only inconsistent item is the number of reported assertions. See [Ruby MinGW 'test-all' Results](https://msp-greg.github.io/file.mingw_test-all.html) for d...
-
01:42 PM Revision fd6dd50f (git): time.c: avoid taking a pointer to a member of packed struct
- clang 4.0.0 emitted a warning: "taking address of packed member
'subsecx' of class or structure 'vtm' may result in an unaligned
pointer value [-Waddress-of-packed-member]".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58570 b2dd03... -
01:19 PM Revision 6ae3cf02 (git): string.c: [DOC] improve docs for String.new
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
10:17 AM Revision 93a6178f (git): internal.h (rb_gc_resurrect): remove stale declaration
- rb_gc_resurrect is no longer defined since r47444.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
08:59 AM Revision 4e6daedc (git): string.c: [DOC] Properly refer to keyword argument by its name
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
08:58 AM Revision 5c8edab9 (git): dir.c: [DOC] Properly refer to keyword argument by its name [Fix GH-1543]
- enc is the name of the variable used in the example, not the name of the
keyword argument (encoding).
The documentation used to wrongly suggest that the keyword argument name was
"enc" which could cause people try try to call `Dir.open(... - 08:55 AM Revision 9f9d9e50 (git): benchmark/bm_vm1_gc_wb_*.rb: fix GC.start args for invalid keyword
- "lazy_sweep" does not appear to have ever been a valid kwarg
for GC.start, however the opposite of "lazy_sweep" appears
to be "immediate_sweep". So use immediate_sweep, and flip
the boolean value of each arg.
I guess this only started ... -
08:13 AM Revision c20bba2c (git): gems/bundled_gems: Update to power_assert 1.0.2
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 07:18 AM Revision 2cdc26f8 (git): .gitignore: ignore benchmark/bm_require.data
- Followup-to r58562 in SVN
* .gitignore: ignore benchmark/bm_require.data
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 07:08 AM Revision e58f5801 (git): benchmark: ignore bm_require.data/
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
06:54 AM Bug #13540 (Closed): can't set length of shared string (RuntimeError) when interpolating __FILE__ in a heredoc
- Applied in changeset trunk|r58561.
----------
parse.y: make shared string modifiable
* parse.y (dedent_string): ensure that the string is modifiable,
not to set the length of shared string.
[ruby-core:80987] [Bug #13540] -
06:54 AM Revision 9133f664 (git): parse.y: make shared string modifiable
- * parse.y (dedent_string): ensure that the string is modifiable,
not to set the length of shared string.
[ruby-core:80987] [Bug #13540]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:07 AM Revision 05e82555 (git): revert 58559, because it fails on travis (rubyspec problem)
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
04:53 AM Revision 1e793b64 (git): remove enc/prelude.rb from list of prelude files in common.mk
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:31 AM Bug #11078 (Closed): 2.2 String#unicode_normalize method does not appear in generated API docs
- Fixed in r58555 and related revisions, by converting Ruby code in lib/unicode_normalize.rb to C code in string.c.
-
02:16 AM Revision f47033e2 (git): refactor common parts of unicode normalization functions into unicode_normalize_common
- In string.c, refactor the common parts (requiring of unicode_normalize/normalize.rb,
check of number of arguments) of the unicode normalization functions
(rb_str_unicode_normalize, rb_str_unicode_normalize_bang, rb_str_unicode_normalized... - 02:13 AM Revision a0d4491f (git): * properties.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 02:13 AM Revision cbd34360 (git): benchmark: new single-threaded read/write benchmark with pipe
- This is currently for testing GVL performance in the uncontended
case: IO#write and IO#read unconditionally release GVL for
blocking I/O with pipe.
It will also be interesting to see how this changes if we switch
to M:N threading model.... -
02:00 AM Revision 140560e4 (git): move definition of String#unicode_normalized? to C to make sure it is documented
- * lib/unicode_normalize.rb: Remove definition of String#unicode_normalized?
(including documentation). Leave a comment explaining that the file is now empty.
* string.c: Define String#unicode_normalized? in rb_str_unicode_normalized_p ... - 01:36 AM Revision 0efb15cd (git): * 2017-05-04
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
01:36 AM Revision 90ab1ee0 (git): move definition of String#unicode_normalize! to C to make sure it is documented
- * lib/unicode_normalize.rb: Remove definition of String#unicode_normalize!
(including documentation)
* string.c: Define String#unicode_normalize! in rb_str_unicode_normalize_bang in C,
(including documentation)
* lib/unicode_normaliz...
05/03/2017
-
06:50 PM Misc #13541 (Closed): [PATCH] test/thread: relax checks for internal implementation
- Queue, SizedQueue, and ConditionVariable internal implementation
should not be tied to using arrays. Implementation details can
change and I am working on a change to remove the dependency on
arrays (as others may attempt, too) by us... -
01:33 PM Bug #13524: miniruby: [BUG] Segmentation fault at 0x0055e487e00230 ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-li
- shyouhei (Shyouhei Urabe) wrote:
> Is it possible for you to show us how to reproduce this?
Please, build it with this [[https://github.com/docker-library/ruby/blob/master/2.4/alpine/Dockerfile]] -
10:24 AM Bug #13524: miniruby: [BUG] Segmentation fault at 0x0055e487e00230 ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-li
- shyouhei (Shyouhei Urabe) wrote:
> Is it possible for you to show us how to reproduce this?
If you try to build it with this Dockerfile it works: https://github.com/docker-library/ruby/blob/master/2.4/alpine/Dockerfile. However I mod... -
12:25 PM Bug #13531 (Closed): RSS: a feed with empty channel description has completely empty '#to_xml' conversion
- Applied in changeset trunk|r58552.
----------
rss: Accept empty text element as valid element
Parser has been accepted it but XML serializer wasn't accepted.
Reported by stefano frabetti. Thanks!!!
[ruby-core:80965] [Bug #13531] - 12:25 PM Revision 6faa8408 (git): rss: Accept empty text element as valid element
- Parser has been accepted it but XML serializer wasn't accepted.
Reported by stefano frabetti. Thanks!!!
[ruby-core:80965] [Bug #13531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 12:18 PM Revision 7abf8bae (git): * remove trailing spaces.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:18 PM Revision 5fee67c9 (git): move definition of String#unicode_normalize to C to make sure it is documented
- * lib/unicode_normalize.rb: Remove definition of String#unicode_normalize
(including documentation)
* string.c: Define String#unicode_normalize in rb_str_unicode_normalize in C,
(including documentation)
* lib/unicode_normalize/norma... -
11:35 AM Feature #13379: [PATCH] safe IMAP connections
- I've merged your patch. Thank you.
Create another ticket for resolv if it's ready.
-
11:32 AM Feature #13379 (Closed): [PATCH] safe IMAP connections
- Applied in changeset trunk|r58549.
----------
net/imap: handle timeouts
Patch by Pavel Rosický. [Feature #13379] [ruby-core:80440] -
11:32 AM Revision 8b51a725 (git): net/imap: handle timeouts
- Patch by Pavel Rosický. [Feature #13379] [ruby-core:80440]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
06:29 AM Bug #13540 (Closed): can't set length of shared string (RuntimeError) when interpolating __FILE__ in a heredoc
- There appears to be a bug in Ruby 2.4.0 and 2.4.1 when interpolating `__FILE__` inside of a heredoc. In fact, no code in this file executes when this interpolation is present. Almost as if it's a syntax error, but it's reported as a Runt...
-
05:08 AM Bug #13539 (Closed): uninitialized class variable @@accept_charset in #<Class:CGI> when calling CGI.unescape
- When I execute this script:
~~~ ruby
require "cgi/util"
CGI.unescape("foo")
~~~
On Ruby 2.3.0 this will execute just fine, but on 2.4.1 this throws an error:
~~~
`unescape': uninitialized class variable @@accept_charset in #... -
03:51 AM Bug #13503: Improve performance of some Time & Rational methods
- Eric Wong <[email protected]> wrote:
> Maybe CPU and compiler differences can account for this.
> What CPU and compiler are you using?
> I tested with AMD FX-8320 @ 3.5GHz + gcc (via Debian 4.9.2-10)
Here is my Pentium M lapto... -
03:51 AM Bug #13503: Improve performance of some Time & Rational methods
- Eric Wong <[email protected]> wrote:
> (+Cc tadf, I guess he has been inactive, lately)
<[email protected]> (expanded from <[email protected]>): host
dotrb.org[219.94.129.152] said: 553 5.3.0 <[email protected]>... User unknown,
no... -
03:41 AM Bug #13503: Improve performance of some Time & Rational methods
- [email protected] wrote:
> Bug #13503: Improve performance of some Time & Rational methods
> https://bugs.ruby-lang.org/issues/13503#change-64447
> ----------------------------------------
> Some Time methods will call internal q... -
03:02 AM Bug #13519: Improve performance of some Time methods
- [email protected] wrote:
> Bug #13519: Improve performance of some Time methods
> https://bugs.ruby-lang.org/issues/13519
> Some Time methods will call internal quov() function and
> quov() calls Numeric#quo -> Rational#quo -> ... -
02:02 AM
Bug #13538 (Closed): head: illegal option -- c
- Applied in changeset trunk|r58548.
----------
Use `dd` instead of `head -c`
[Bug #13538] [ruby-dev:50106] -
02:01 AM Bug #13538 (Closed): head: illegal option -- c
- [Solaris 11.3でビルドを試した](http://blog.n-z.jp/blog/2017-05-02-ruby-sample.html)ところ、configure の最後で以下のようなエラーが出ました。
---
Configuration summary for ruby version 2.5.0
head: illegal option -- c
usage: head [-n #] [-#] [... -
02:02 AM Revision 929807a9 (git): Use `dd` instead of `head -c`
- [Bug #13538] [ruby-dev:50106]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:44 AM Revision 5c10fb41 (git): Fix NoMethodError [ci skip]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
05/02/2017
-
10:46 PM Bug #13496: Patches for MinGW builds - gnu_printf in 'config' & defines.h
- Hiroshi,
Today, I updated [ruby-loco](https://github.com/MSP-Greg/ruby-loco) to work with current builds.
I've added a page to my doc site, [Ruby MinGW test-all](https://msp-greg.github.io/file.mingw_test-all.html), it contains a b... -
05:48 PM Bug #13536 (Closed): Ripper fails to tokenize nested squiggly heredoc
- Applied in changeset trunk|r58545.
----------
ripper/lexer.rb: nested indented heredoc
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
nested indedented here documents, where `Elem`s are nested too.
[ruby-core:80977] ... -
02:05 PM Bug #13536 (Closed): Ripper fails to tokenize nested squiggly heredoc
- ```ruby
require 'ripper'
str = \
<<~'end'
<<~"do"
#{
<<~"begin"
this must be a valid ruby
begin
}
do
end
puts eval(str)
str == Ripper.tokenize(str)
```
This program fails at the last line. - 05:48 PM Revision 7e73e70d (git): * 2017-05-03
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
05:48 PM Revision d24c4683 (git): ripper/lexer.rb: nested indented heredoc
- * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
nested indedented here documents, where `Elem`s are nested too.
[ruby-core:80977] [Bug #13536]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58545 b2dd03c8-39d4-4d8f-... -
05:44 PM Feature #13201: Gemify dbm
- Could you please provide "Source Code" location information on rubygems.org? That would be helpful. Thx.
-
01:08 AM Feature #13201 (Closed): Gemify dbm
- I shipped dbm gem implemented CRuby.
https://rubygems.org/gems/dbm
And update its gemspec on ruby core repository at r58314 -
03:09 PM Bug #13537: ruby crash in rb_gc_mark
- It should be marking miss failure.
Could you give us the way to reproduce it? -
02:28 PM Bug #13537 (Closed): ruby crash in rb_gc_mark
- ruby crashes on me fairly regularly while working on a rails app. It happens after a file has changed and the guard gem fires up some tests. It appears to be happening when running rubycritic via guard:
```
running flay smells
run... -
01:16 PM Revision 3692fd69 (git): .travis.yml: tweek after-update
- * .travis.yml (before_script): get rid of making miniruby at
after-update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:45 PM Revision d5c776ad (git): mkconfig.rb: remove cross_compiling
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:45 PM Revision 842a05d2 (git): common.mk: BOOTSTRAPRUBY for enc.mk
- * common.mk ($(ENC_MK)): use $(BOOTSTRAPRUBY) as well as $(RBCONFIG),
instead of $(MINIRUBY).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
11:26 AM Revision 2430822b (git): Use `\A` and `\z` instead of `^` and `$` [ci skip]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
09:56 AM Bug #13535: Installing Ruby2.4.1 on Solaris 10
- Thank you, but version 1.9.1 is too old (relased 7 years ago maybe?). We no longer maintain.
Can you try a newer version? If it still happens let us know. -
09:40 AM Bug #13535 (Closed): Installing Ruby2.4.1 on Solaris 10
- Hello
When we install Ruby 1.9.1 on Solaris 10, we execute these commands.
```
# gunzip -c ruby-1.9.1-p0.tar.gz | tar xf –
# cd ruby-1.9.1-p0
# ./configure –prefix=/opt/local –enable-pthread –includedir=/opt/local/include
# mak... -
09:21 AM Feature #13517: [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- At a glance, it seems nice.
But I need to time to check deeply.
I'll check with 'Misc #13514'.
Please wait these days. In Japan, now we have holiday week. I'll check on these days.
Thanks,
Koichi -
09:12 AM Feature #13517: [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
- [email protected] wrote:
> Feature #13517: [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
> https://bugs.ruby-lang.org/issues/13517
Any comment? I would like to commit this, soon.
Thanks. -
07:35 AM Revision 6519aba3 (git): internal.h: rb_raise_static
- * internal.h (rb_raise_static): raise with a static message string
literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:46 AM Revision 107f1572 (git): remove unnecessary conditions in lib/unicode_normalize.rb
- Because the methods in lib/unicode_normalize.rb are overwritten
by those in lib/unicode_normalize/normalize.rb as soon as one
of them is called, the check for whether UnicodeNormalized is
defined or not is no longer necessary.
git-svn-i... -
05:34 AM Revision 8001dae8 (git): rework definition of String#unicode_normalize! and #unicode_normalized?
- simplify String#unicode_normalize! and #unicode_normalized?
in lib/unicode_normalize.rb by redefining them
in lib/unicode_normalize/normalize.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:15 AM Revision 42b87137 (git): rework definition of String#unicode_normalize
- simplify String#unicode_normalize in lib/unicode_normalize.rb
by redefining it in lib/unicode_normalize/normalize.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:44 AM Feature #13534 (Closed): Checking installation results of default gems
- It's a reminder.
I merged rubygems-2.6.12 at r58530. But it backports was removed `test_realworld_default_gem` from original release.
Because `test_realworld_default_gem` verifies installation results of default gems. So ruby test su... - 02:40 AM Revision 43ae954f (git): * properties.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 02:40 AM Revision 7ef49716 (git): more benchmarks for SizedQueue and ConditionVariable
- I'm working on patches to improve everything in thread_sync.c,
add these to track progress.
* benchmark/bm_vm_thread_sized_queue.rb: add description
* benchmark/bm_vm_thread_condvar1.rb: new benchmark
* benchmark/bm_vm_thread_condvar2.r... -
02:37 AM Bug #13533 (Closed): please backport r58534
- closing to trigger backport request
-
02:37 AM Bug #13533 (Closed): please backport r58534
- ```
This bug causes busy wait (100% CPU usage) on IO.copy_stream
with sockets/pipes with O_NONBLOCK set.
In other words, the following code should not cause 100% CPU usage,
just hang forever w/o burning CPU:
require 'io/nonbloc... -
02:19 AM Revision ca8f454f (git): nogvl_wait_for_single_fd must wait as its name
- poll(fds, n, 0) mean no timeout and immediately return. If you want to
wait something, you need to use -1 instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:16 AM Feature #13532 (Assigned): Enable :encoding key or open-uri (open()) similar as to how File.read() and File.readlines() already allow for
- FYI bare (non-uri) open has encoding: option.
```
irb(main):001:0> File.open("tmp.txt", encoding: Encoding::Windows_31J) {|fp| fp.external_encoding }
=> #<Encoding:Windows-31J>
```