Project

General

Profile

Activity

From 09/25/2014 to 10/01/2014

10/01/2014

11:03 PM Revision 57da36eb (git): iseq.c (rb_iseq_line_trace_each): explicit cast
Fix https://travis-ci.org/ruby/ruby/jobs/36814282
Tested with -Wconversion since my gcc lacks -Wshorten-64-to-32
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
09:49 PM Feature #10267: Number of processors
Thanks Eric.
I also found a design issue in my patch. So, I wrote v2 patch from scratch.
kosaki (Motohiro KOSAKI)
09:20 PM Feature #10267: Number of processors
kosaki.motohiro@gmail.com wrote:
> I wrote an incrementa patch on top of akr's etc-nprocessors3.patch for this purpose.
> (see attached etc-nprocessors-kosaki.patch file.)
>
> Comments are welcome!

Minor: we need to call CPU_FRE...
normalperson (Eric Wong)
09:00 PM Feature #10267: Number of processors
> kosaki-san said he will improve the method for container on GNU/Linux.
> ...
I wrote an incrementa patch on top of akr's etc-nprocessors3.patch for this purpose.
(see attached etc-nprocessors-kosaki.patch file.)
Comments are welco...
kosaki (Motohiro KOSAKI)
09:20 PM Misc #10249: [PATCH] set rb_event_flag_t to uint32_t
ko1@atdot.net wrote:
> I'm not sure why it is valuable, but no problem to do it.

Committed r47759 - This can open up some tiny data structure packing
opportunities. I prefer small data structures in general, as Ruby keeps
getting...
normalperson (Eric Wong)
09:13 PM Revision 11f35267 (git): ruby.h: set rb_event_flag_t to uint32_t
This ensures a consistent implementation between 32 and 64-bit
platforms, as vm_trace.c limits events to 32-bits. This can
also open up struct packing opportunities.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47759 b2dd03c8-39d4...
Eric Wong
08:36 PM Revision 3aab1f84 (git): io.c (fptr_finalize): free memory before GC sweep
This releases memory on explict calls to rb_io_close,
reducing pressure on the GC.
Final massif snapshot shows reduced heap usage after RubyGems load
(valgrind --tool=massif ./ruby -e exit)
before:
mem_heap_B=4821992
me...
Eric Wong
08:29 PM Revision cfc56579 (git): * 2014-10-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:29 PM Revision a17ffebf (git): marshal.c: lazy compat_tbl allocation
In some common cases, compat_tbl is unused in dump_arg/load_arg,
so avoid malloc/free costs for the unused table.
ruby -e 'h = {a: :b}; 600000.times { Marshal.load(Marshal.dump(h)) }'
before:
real 0m2.458s
user 0m...
Eric Wong
07:14 PM Misc #10312: Give people more control over how the ruby parser sees code and lexical code elements (valid/invalid - toggle options) + macros
Hi,
The problem is that they are extremely similar to the other solutions
such as:
~~~
jquery :+
~~~
Like
~~~
jquery.+
~~~
Not counting the ' ' character, that one has the same amount of
tokens as the above varia...
shevegen (Robert A. Heiler)
06:44 PM Misc #10312: Give people more control over how the ruby parser sees code and lexical code elements (valid/invalid - toggle options) + macros
Here are a couple of options for your use case, if you want terse syntax that is valid ruby:
jquery.+
jquery.-
or:
+jquery
-jquery
jeremyevans0 (Jeremy Evans)
06:28 PM Misc #10312 (Open): Give people more control over how the ruby parser sees code and lexical code elements (valid/invalid - toggle options) + macros
Hi,
I am aware that this proposal has most likely not a chance for
implementation, but I'd still like to make it - this is why I
put it here into misc rather than bugs or features. It's misc -
like ideas!
So first allow me to in...
shevegen (Robert A. Heiler)
05:48 PM Feature #10064: &:symbol in when clause
Yukihiro Matsumoto wrote:
> The original idea includes dispatch based on type (Symbol), which is not a good idea in general.
I'm not sure I understand. I think the original idea would work for other types too; the syntax would just b...
marcandre (Marc-Andre Lafortune)
09:47 AM Feature #10064: &:symbol in when clause
What about allowing syntax like this:
~~~ruby
->&Proc.new{|y| y.zero?} #=> Should be equivalent to ->{|x| x.zero?}
->&:zero? #=> Should be equivalent to ->{|x| x.zero?} (Symbol#to_proc applies implicitly)
~~~
This...
sawa (Tsuyoshi Sawada)
04:34 PM Bug #10311: Segmentation fault when starting rails server (2.2.0-preview1 & 4.2.0-beta2)
upd.
I also tried new rails project with postgresql database and I got seg. fault with byebug now.
After removing byebug I have seg. fault with web console.
After removing web console it finally started.
Both error logs in attach...
gazay (Alex Gaziev)
04:14 PM Bug #10311 (Closed): Segmentation fault when starting rails server (2.2.0-preview1 & 4.2.0-beta2)
I've just installed `ruby 2.2.0-preview1` with `ruby-install` (I'm not using `rvm`/`rbenv`, just `ruby-install` and `chruby`) and `rails 4.2.0-beta2`.
I've created new project, ran `bundle install` and then tried to execute `bundle exec...
gazay (Alex Gaziev)
03:14 PM Bug #10310 (Rejected): Segmentation fault when trying to install bundle on Ruby 2.2.0dev
Hi, I've encountered following error when I tried to gem install bundle.
I'm not sure what's going on so I just attached a log file here.
If there is anything I can do to solve it please let me know.
~~~
git:master ❯ gem install ...
hbd225 (Norimasa Ando)
12:16 PM Revision 3b841719 (git): * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:16 PM Revision 8d00b43b (git): ext/win32ole/win32ole_type.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e suke (Masaki Suketa)
11:44 AM Feature #4147: Array#sample で重みを指定したい
gogo tanaka wrote:
> こんにちは.
> ...
この件については、結局どのような仕様を入れるのかというのがポイントな気がしますが、
パッチがあった方が話が早い可能性もあるかな、といったところでしょうか。
> 2年前という事で、他の文脈がある事やどなたかが着手されている事を危惧致しました.
わたしの知る限りでは進捗ないと思います。
うらべさん、あるいは他のどなたか何かありますか?
naruse (Yui NARUSE)
03:34 AM Feature #4147: Array#sample で重みを指定したい
こんにちは.
大変昔の話を掘り返すようで恐縮ですが、こちらてパッチを書いたら取り込まれる可能性てございますか?
(もちろんそのパッチ如何によるんでしょうが)
まずはパッチ書いてからにしろという話なら申し訳ございません、
2年前という事で、他の文脈がある事やどなたかが着手されている事を危惧致しました.
gogotanaka (Kazuki Tanaka)
09:15 AM Revision 2b0cc32c (git): * compile.c: remove commented out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
08:48 AM Revision f17b95f2 (git): test/fileutils/test_fileutils.rb: AIX does not allow a sticky bit on a regular file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Rei Odaira
08:33 AM Revision 1c916105 (git): Fix typo in ChangeLog header
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e drbrain (Eric Hodel)
08:32 AM Revision b9ef91ef (git): * NEWS: Add RubyGems update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e drbrain (Eric Hodel)
08:30 AM Revision 69368346 (git): * 2014-10-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:30 AM Revision cec4f5a9 (git): * lib/rubygems: Update to RubyGems 2.4.2.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
drbrain (Eric Hodel)
08:07 AM Bug #10309 (Rejected): Unexpected keyword parameters becomes an additional mandatory parameter
Ah, I'm sorry. It is duplicated ticket (I can't find another ticket).
My misunderstanding.
ko1 (Koichi Sasada)
06:44 AM Bug #10309 (Rejected): Unexpected keyword parameters becomes an additional mandatory parameter
Is it an intentional behaviour?
```ruby
def foo a, b, c, k1: 1
p [a, b, c, k1]
end
foo 1, 2, {k1: 3, k2: 4}
#=> [1, 2, {:k1=>3, :k2=>4}, 1]
foo 1, 2, k1: 3, k2: 4
#=> [1, 2, {:k1=>3, :k2=>4}, 1]
```
ko1 (Koichi Sasada)
05:04 AM Feature #10298: Array#float_sum (like math.fsum of Python)
Timing.
Of course it is fast.
```
$ uname -sprsv
Darwin 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 i386
$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i5-3210M...
t-nissie (Takeshi Nishimatsu)
12:13 AM Feature #10095: Object#as
Andrew Vit wrote:
> This feature also looks a lot like a pipeline.
> ...
related: #10308
I've actually done it too before, I just literally named it pipe:
https://github.com/baweaver/pipeable
or Stream which was something to t...
baweaver (Brandon Weaver)

09/30/2014

11:21 PM Feature #10308: Pipes in Ruby
Related: #10095 avit (Andrew Vit)
10:06 PM Feature #10308 (Open): Pipes in Ruby
Much akin to the Unix and Elixir piping, I think it would be an interesting feature to consider in Ruby.
There have already been a number of hack implementations of it:
https://gist.github.com/pcreux/2f87847e5e4aad37db02
https://git...
baweaver (Brandon Weaver)
01:25 PM Revision ffe920d6 (git): parse.y: separate ripper data type
* parse.y (parser_data_type): separate ripper data type for from
parser.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:10 PM Feature #9999: Type Annotations (Static Type Checking)
I like the principal idea behind it.
For instance, today I wrote ruby code like this (yes, hate me for using set_ methods
but I like it visually because my brain works that way):
def set_be_verbose(i)
@be_verbose = i
end...
shevegen (Robert A. Heiler)
09:47 AM Revision d7b32ffd (git): * ext/win32ole/win32ole_typelib.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e suke (Masaki Suketa)
09:20 AM Feature #10274: [PATCH 0/2] more rb_iseq_t reductions (and more planned)
I reject 0002, but I don't think 0001 hurts readability.
I will update arg_simple to 0..3 from nobu's comment.
normalperson (Eric Wong)
08:29 AM Revision b208e060 (git): ext/digest: hide metadata objects for internal use
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
05:25 AM Revision 28b9f11d (git): protoize no-arguments functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
03:13 AM Bug #10306 (Feedback): BigNum error
What result did you get?
The word "obvious" is not obvious.
nobu (Nobuyoshi Nakada)
02:30 AM Bug #10306: BigNum error
On Darwin (Mac OS X), I made miniruby with /usr/bin/cc and /usr/local/bin/gcc (gcc-4.8.2 installed by myself).
I got the same correct results with both minirubys:
```
$ /usr/bin/cc --version
Apple LLVM version 5.1 (clang-503.0.40) ...
t-nissie (Takeshi Nishimatsu)
01:17 AM Revision cf5450bb (git): common.mk: mark PHONY targets
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
01:17 AM Revision d2be0297 (git): common.mk: update only non-existing files
* common.mk (update-config_files): update only non-existing files,
and get rid of trying to download existing files every time.
gitweb does not send Last-Modified header.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47742 b2dd0...
nobu (Nobuyoshi Nakada)
12:51 AM Revision f2673b8c (git): * 2014-09-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:51 AM Revision d3a405b9 (git): * common.mk: fixed broken reference of update-config_files task
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)

09/29/2014

08:26 PM Misc #10307 (Closed): Add doc for Array.reject, it maintains ordering
Hi, I'm trying to follow the instructions in http://documenting-ruby.org/step-by-step-guide.html for submitting documentation.
I sent a pull request to https://github.com/documenting-ruby/ruby/pull/42 for quality review, but didn't ge...
nebu (Nebu Pookins)
06:45 PM Bug #10306: BigNum error
Cannot be reproduced on ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]. I get the correct result:
1000000000 ** 99
# => 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
sawa (Tsuyoshi Sawada)
04:46 PM Bug #10306 (Closed): BigNum error
Some calculations are wrong when dealing with large bignums.
For example, try 1000000000 ** 99, the result is obviously not right.
Nax (Max Bacoux)
02:13 PM Revision ef9d1349 (git): racc/cparse: private class
* ext/racc/cparse/cparse.c (Init_cparse): Racc::CparseParams is a
private class, undefine allocate and initialize methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:05 PM Feature #10305 (Open): Method for resolving all autoload statements / Add warning on autoload when used with chroot
Hi everyone,
I’m currently trying to make my way to create a chrooted process using Dir.chroot. However, once these lines are executed:
~~~ ruby
Dir.chroot("/some/path/here")
Dir.chdir("/")
~~~
all libraries that use the #aut...
Quintus (Marvin Gülker)
01:54 PM Revision edae1c72 (git): win32/file.c: fix no user exception
* win32/file.c (append_wstr): set expanded length, not length of
appended string. fix "probable buffer overflow" bug.
[ruby-core:65317] [Bug #10304]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47738 b2dd03c8-39d4-4d8f-98ff-82...
nobu (Nobuyoshi Nakada)
01:54 PM Bug #10304 (Closed): File.expand_path crashes with tilde on Windows
Applied in changeset r47737.
----------
string.c: fix NOFREE
* string.c (str_make_independent_expand): drop NOFREE flag after
reallocation, static buffer is not pointed anymore.
[ruby-core:65317] [Bug #10304]
nobu (Nobuyoshi Nakada)
09:43 AM Bug #10304 (Closed): File.expand_path crashes with tilde on Windows
`File.expand_path` crashes with user home which starts with tilde using mingw ruby.
`TestFileExhaustive#test_expand_path_home` in test-all crashed.
```
$ ./miniruby -e 'File.expand_path("~aaaaaaaaaaaaaaaaaaaaaa")'
-e:1: [BUG] p...
h.shirosaki (Hiroshi Shirosaki)
01:54 PM Revision ef08f005 (git): string.c: fix NOFREE
* string.c (str_make_independent_expand): drop NOFREE flag after
reallocation, static buffer is not pointed anymore.
[ruby-core:65317] [Bug #10304]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47737 b2dd03c8-39d4-4d8f-98ff-823f...
nobu (Nobuyoshi Nakada)
12:17 PM Revision 2f2f92b7 (git): digest: no check for hidden objects
* ext/digest/digest.c (get_digest_base_metadata): metadata objects
are hidden from ruby level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:06 PM Bug #10300: Encoding error in conversion from UTF-16LE to UTF-8 to CP850
Hello,
I just experienced the same problem than Guillaume on Windows 7 and tried your patch. It solved the problem perfectly.
nanarth (Adrien Bernhardt)
08:38 AM Feature #10274: [PATCH 0/2] more rb_iseq_t reductions (and more planned)
-1 because of readability.
But it is possible that nobody reads it.
I don't against it but I may fix it later.
ko1 (Koichi Sasada)
08:09 AM Feature #10274: [PATCH 0/2] more rb_iseq_t reductions (and more planned)
`arg_simple` is 0..3, not 0..2. nobu (Nobuyoshi Nakada)
08:34 AM Misc #10249: [PATCH] set rb_event_flag_t to uint32_t
I'm not sure why it is valuable, but no problem to do it.
ko1 (Koichi Sasada)
08:10 AM Bug #6785 (Open): Documentation for RubyVM::InstructionSequence
Please mark they are implementaton and version dependent methods.
ko1 (Koichi Sasada)
07:44 AM Feature #10295: [PATCH] io.c (fptr_finalize): free memory (before GC sweep)
+1.
ko1 (Koichi Sasada)
07:16 AM Feature #10238: todo: remove dependency on malloc_usable_size
Eric Wong wrote:
> malloc_usable_size shows up at or near the top of many profiles for me.
We can check the performance impact by enabling HAVE_MALLOC_USABLE_SIZE macro.
Try this program:
```ruby
require 'benchmark'
Benchmark...
ko1 (Koichi Sasada)
05:57 AM Misc #10297 (Closed): r47670 make benchmark/bm_vm_thread_create_join.rb slow
確認ありがとうございます。
> ハングしたときとかにスレッドが何者なのか ps で見れるようにするコストということでどうかなぁ。
そうですね。では閉じておきます。
authorNari (Narihiro Nakamura)
02:20 AM Revision b5de461a (git): date_core.c: revert const
* ext/date/date_core.c (SimpleDateData, ComplexDateData): revert
const for aggregation assignments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:45 AM Revision cedc0d1f (git): date_core.c: more write-barriers
* ext/date/date_core.c (SimpleDateData, ComplexDateData): constify
VALUE members to find out missing write-barriers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:49 AM Revision 036acdab (git): date_core.c: write-barrier
* ext/date/date_core.c (d_lite_type): add write-barrier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:49 AM Revision e912c167 (git): date_core.c: typed data
* ext/date/date_core.c (d_lite_type): turn into typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)

09/28/2014

09:47 PM Revision a05330f4 (git): tool/downloader.rb: fix for old ruby on old CentOS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
03:27 PM Revision c47b5232 (git): ruby.h: warn untyped Data
* include/ruby/ruby.h (rb_data_object_alloc_warning): warn
Data_Wrap_Struct and Data_Make_Struct only if
RUBY_UNTYPED_DATA_WARNING is set to 1.
* include/ruby/ruby.h (rb_data_object_get_warning): ditto for
Data_Get_Struct.
git-sv...
nobu (Nobuyoshi Nakada)
03:26 PM Revision ae7eb5fe (git): downloader.rb: compatibility with old BASERUBY
* tool/downloader.rb (Downloader.download): get rid of post
arguments for compatibility with old BASERUBY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:09 PM Revision f4940421 (git): * 2014-09-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:09 PM Revision 90e99bea (git): * gc.c (rb_gcdebug_print_obj_condition): use RVALUE_REMEMBERED
because GET_HEAP_REMEMBERSET_BITS is obsoleted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ktsj (Kazuki Tsujimoto)
12:42 PM Misc #10297 (Feedback): r47670 make benchmark/bm_vm_thread_create_join.rb slow
なるほど。たしかに遅くなっているようです。
strace でみると、周辺の処理に比べて桁違いに時間がかかっているわけではないようなので、
ハングしたときとかにスレッドが何者なのか ps で見れるようにするコストということでどうかなぁ。
```
% strace -f -r ./miniruby -e 'Thread.new{}.join'
...
[pid 5243] 0.000015 munmap(0x7f4118000000, 548...
akr (Akira Tanaka)
12:39 PM Bug #10301: All version of Ruby core dump in ethon running wpstools (wpscan)
https://github.com/typhoeus/ethon/issues/91 - ethon bug. Recorded here for reference. dfavor (David Favor)
12:58 AM Bug #10301 (Third Party's Issue): All version of Ruby core dump in ethon running wpstools (wpscan)
`ethon` seems using `ffi`.
Ruby is not answerable for libraries using `ffi`.
Ask `ethon` developers.
nobu (Nobuyoshi Nakada)
11:49 AM Bug #10303 (Closed): rb_data_type_t need to be described in README.EXT
because untyped Data will be "deprecated" in the future, and TypedData is now more than 4 years old,
add an howto in the README.EXT how to effective use the "new" rb_data_type_t struct,
because while porting i noticed many little prob...
Hanmac (Hans Mackowiak)
11:27 AM Revision 1c01280d (git): downloader.rb
* configure.in: use tool/downloader.rb directly.
* tool/get-config_files: no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:46 AM Feature #10302: [PATCH] marshal.c: lazy compat_tbl allocation
Seems fine. nobu (Nobuyoshi Nakada)
03:34 AM Feature #10302 (Closed): [PATCH] marshal.c: lazy compat_tbl allocation
Will commit in a few days.
In some common cases, `compat_tbl` is unused in `dump_arg`/`load_arg`,
so avoid malloc/free costs for the unused table.
~~~
ruby -e 'h = {a: :b}; 600000.times { Marshal.load(Marshal.dump(h)) }'
befor...
normalperson (Eric Wong)
04:20 AM Feature #10238: todo: remove dependency on malloc_usable_size
nobu@ruby-lang.org wrote:
> If it's a `Fixnum`, the size should be 0 for NULL `ptr`.
I was under the impression DATA_PTR is not NULL in nearly all cases,
but I did not check closely for all those classes.
But this patch may not b...
normalperson (Eric Wong)
03:23 AM Feature #10238: todo: remove dependency on malloc_usable_size
If it's a `Fixnum`, the size should be 0 for NULL `ptr`.
`enc_memsize` seems unnecessary anyway, indeed.
nobu (Nobuyoshi Nakada)
03:17 AM Feature #10238: todo: remove dependency on malloc_usable_size
I'm not sure if function pointers are guaranteed to be word-aligned. nobu (Nobuyoshi Nakada)
02:29 AM Feature #10238: todo: remove dependency on malloc_usable_size
normalperson@yhbt.net wrote:
> One possible improvement is to allow the rb_data_type_t->dsize pointer
> to be a FIXNUM, removing the need for some memsize functions.

Something like:
http://80x24.org/spew/m/20140928022441.GA24830...
normalperson (Eric Wong)
02:54 AM Revision 3bbea8ed (git): tool/downloader.rb: split particular sites
* tool/downloader.rb (Downloader): split particular sites from the
main class.
* tool/downloader.rb (Downloader.download): show messages if
verbose mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47725 b2dd03c8-39d4-4d8f-98...
nobu (Nobuyoshi Nakada)
02:14 AM Revision ceb32c67 (git): * 2014-09-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
02:14 AM Revision 69cbd810 (git): common.mk: Created new target update-unicode to download
some Unicode data files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
duerst (Martin Dürst)
02:12 AM Bug #10300 (Feedback): Encoding error in conversion from UTF-16LE to UTF-8 to CP850
Or from `FormatMessage`?
Can you try with this patch?
~~~patch
index 74cc77d..4df59a9 100644
--- a/ext/win32/lib/win32/registry.rb
+++ b/ext/win32/lib/win32/registry.rb
@@ -174,8 +174,15 @@ For detail, see the MSDN[http://msdn....
nobu (Nobuyoshi Nakada)

09/27/2014

11:55 PM Bug #10300: Encoding error in conversion from UTF-16LE to UTF-8 to CP850
There is no bug in the conversion from (UTF-16LE to) UTF-8 to CP850. CP850 simply doesn't contain U+2019 (RIGHT SINGLE QUOTATION MARK, see http://www.unicode.org/charts/PDF/U2000.pdf), see e.g. https://en.wikipedia.org/wiki/Code_page_850... duerst (Martin Dürst)
03:01 PM Bug #10300 (Closed): Encoding error in conversion from UTF-16LE to UTF-8 to CP850
Hello,
I downloaded Ruby 2.1.3 from http://rubyinstaller.org/downloads/ and tried to install gems:
~~~
$ gem install asciidoctor
ERROR: While executing gem ... (Encoding::UndefinedConversionError)
U+2019 to CP850 in convers...
ggrossetie (Guillaume GROSSETIE)
04:00 PM Bug #10301 (Third Party's Issue): All version of Ruby core dump in ethon running wpstools (wpscan)
Seems like this is a bug, as an error or warning should be produced rather than Ruby core dumping.
Same behavior exists in Ruby 1.9.1 + 1.9.3 + 2.0 creating exactly the same stack trace.
Attached is the Ruby2.0 data. System is a pl...
dfavor (David Favor)
12:30 PM Bug #10299 (Closed): alias_method :new_foo=, :"#{:foo}=" doesn't work properly on ruby 2.2.0preview1.
nobu (Nobuyoshi Nakada)
08:55 AM Bug #10299 (Closed): alias_method :new_foo=, :"#{:foo}=" doesn't work properly on ruby 2.2.0preview1.
Here is reproducible script.
~~~ruby
class Test
class << self
def test
alias_method :new_foo=, :"#{:foo}="
end
end
attr_accessor :foo
test
end
~~~
It occurs following error.
~~~
NameError: undefi...
hbd225 (Norimasa Ando)
08:34 AM Bug #10276: nil/true/false に singleton メソッドを定義できてしまう
frozen なオブジェクトに特異クラスが作成できるかどうかも統一されていないようですが、そういうものなのでしょうか?
~~~
>> RUBY_DESCRIPTION
=> "ruby 2.2.0dev (2014-09-25 trunk 47711) [x86_64-linux]"
> ...
TypeError: can't define singleton
from (irb):2
from /home/kazu/....
znz (Kazuhiro NISHIYAMA)
08:17 AM Revision 4d2aef1e (git): rbinstall.rb: header targets
* tool/rbinstall.rb: separate header targets, comm-hdr for
architecture independent headers, arch-hdr for architecture
dependent headers, and hdr for both.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47722 b2dd03c8-39d4-4d8f-9...
nobu (Nobuyoshi Nakada)
07:44 AM Feature #10073: [PATCH] Implement Laplace expansion for matrix.
@Marc-Andre Lafortune
Thank you very much for responding.
```
m.laplace_expansion(row: k-1) == m.laplace_expansion(column: k-1) == m.det
```
The interface you suggested is really make sense for me.
OK, Let me handle this.
gogotanaka (Kazuki Tanaka)
07:35 AM Feature #10042: Deprecate postfix rescue syntax for removal in 3.0
Got it, this is what I proposed:
~~~ruby
do_messy_job resc TypeError: 42, NameError: 43
~~~
Anonymous
07:32 AM Feature #10042: Deprecate postfix rescue syntax for removal in 3.0
Nooo! Don't remove tail rescue! I suggested to introduce tail "resc" keyword with exception to be rescued somewhere here. Anonymous
03:13 AM Bug #10150 (Closed): Tiny URI.parse error incompatibility
Applied in changeset r47721.
----------
* lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150]
* test/uri/test_parser.rb: test for above.
Anonymous
03:13 AM Revision a4645e56 (git): * lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150]
* test/uri/test_parser.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Glass_saga (Masaki Matsushita)
01:34 AM Revision dd798a68 (git): * gems/bundled_gems: upgraded to power_assert 0.1.4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ktsj (Kazuki Tsujimoto)
01:30 AM Revision 15ae462d (git): digest.c: typed data
* ext/digest/digest.c (rb_digest_base_alloc): use typed data.
* ext/digest/digest.c (rb_digest_base_copy): fail unless original
object has same algorithm.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47719 b2dd03c8-39d4-4d8f-98f...
nobu (Nobuyoshi Nakada)
01:28 AM Revision 851c2f2d (git): * 2014-09-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
01:28 AM Revision bb10a213 (git): ruby.h: deprecate plain Data
* include/ruby/ruby.h (rb_data_object_alloc_deprecated): deprecate
Data_Make_Struct and Data_Wrap_Struct. [EXPERIMENTAL]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)

09/26/2014

10:50 PM Bug #10284: Segmentation fault on Ruby 2.1.2 and 2.1.3
Eric Wong wrote:
> moreno.carullo@gmail.com wrote:
> ...
for example:
~~~
/usr/local/lib/ruby/2.1.0/webrick/httpserver.rb:75: [BUG] Segmentation fault at 0x00000000000008
[00:28:59]ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_6...
moreno.carullo (Moreno Carullo)
09:24 PM Bug #10296: SEGV from unchecked Data_Get_Struct() argument
Yes it seems like all uses of Data_Get_Struct() should be changed to use TypedData_Get_Struct() instead, doesn't it? TypedData* seems like a strictly better interface and it can provide type checking.
There are probably other instance...
jhaberman (Josh Haberman)
07:42 AM Bug #10296: SEGV from unchecked Data_Get_Struct() argument
Calling initialize_copy directly is probably buggy behavior and not
unique to just the json/zlib C extensions.

Other than telling users to never call initialize_copy directly, I'm not
sure what to do about it. It would be a lot of...
normalperson (Eric Wong)
12:12 AM Bug #10296 (Closed): SEGV from unchecked Data_Get_Struct() argument
I can crash all Ruby versions I tried with this program:
```ruby
require 'json'
require 'zlib'

module JSON
module Ext
module Generator
class State
def foo
initialize_copy(Zlib::GzipWriter.new('...
jhaberman (Josh Haberman)
04:33 PM Feature #10095: Object#as
This feature also looks a lot like a pipeline.
Here are some examples how people implemented that before, either using simple blocks or more complex generator/consumer queues:
https://gist.github.com/pcreux/2f87847e5e4aad37db02
ht...
avit (Andrew Vit)
09:56 AM Feature #7549 (Rejected): A Ruby Design Process
I just read a blog that said this issue was still open.
I might be slightly biased (see my comments above), but in order to avoid confusion, I'm closing this issue because the proposal is no longer actively discussed.
If somebody has a...
duerst (Martin Dürst)
09:49 AM Feature #10298 (Rejected): Array#float_sum (like math.fsum of Python)
Here, I propose Array#float_sum in array.c (or math.c).
Array#float_sum returns an accurate total summation of Float
elements in an array using the Kahan summation algorithm
http://en.wikipedia.org/wiki/Kahan_summation_algorithm .
Th...
t-nissie (Takeshi Nishimatsu)
09:28 AM Misc #10297 (Closed): r47670 make benchmark/bm_vm_thread_create_join.rb slow
nariです。
r47670でbm_vm_thread_create_join.rbが10%ほど遅くなったようです。
スレッドをバンバン生成するベンチマークなので、スレッドに名前付けするところの影響がでているかなと思いました(が詳しいところは計測できていません…)。
r47669
% time ./miniruby -e '10000.times{ Thread.new{}.join }'
./miniruby -e '10000.times{ Thr...
authorNari (Narihiro Nakamura)
06:28 AM Bug #10294: Dir[] cannot be called with an array argument
I'm aware of what actually works in practice, but the documentation claims both forms are acceptable:
```
Dir[ array ] → array
Dir[ string [, string ...] ] → array
```
https://github.com/ruby/ruby/blob/2a8989d71c611884631c4d9ff5...
Anonymous
04:04 AM Bug #10294 (Rejected): Dir[] cannot be called with an array argument
Not an array of path names, any number of path names,
~~~ruby
Dir['/bin/bash', '/bin/sh']
~~~
nobu (Nobuyoshi Nakada)
05:45 AM Bug #10290: segfault when calling a lambda recursively after rescuing SystemStackError
I can't reproduce it with irb, but it might access over the top of stack.
Possibly, we need more margin for the guard page.
nobu (Nobuyoshi Nakada)
03:52 AM Bug #10285 (Closed): StringIO with encodings broken due to #9769
Applied in changeset r47716.
----------
stringio.c: ASCII-8BIT StringIO rejects no encodings
* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
should be writable any encoding strings, without conversion.
[ruby-core:65240...
nobu (Nobuyoshi Nakada)
03:52 AM Revision 2a8989d7 (git): stringio.c: ASCII-8BIT StringIO rejects no encodings
* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
should be writable any encoding strings, without conversion.
[ruby-core:65240] [Bug #10285]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47716 b2dd03c8-39d4-4d8f-98ff...
nobu (Nobuyoshi Nakada)

09/25/2014

09:31 PM Bug #10284: Segmentation fault on Ruby 2.1.2 and 2.1.3
moreno.carullo@gmail.com wrote:
> Hi all, I often (let's say 50% of the times the test suite is run) get this segmentation fault on both mentioned versions.
> Please note that the method/line where it breaks is always different!

Wh...
normalperson (Eric Wong)
08:39 PM Bug #10282: Reproducible segfault when inspecting this method
normalperson@yhbt.net wrote:
> File 0001-object.c-rb_class_real-do-not-dereference-0-VALUE.patch added

> This looks to be a simple dereference bug.
> However, this is my first time looking a prepend so maybe there's a subtle
> beh...
normalperson (Eric Wong)
08:29 PM Bug #10282 (Closed): Reproducible segfault when inspecting this method
Applied in changeset r47715.
----------
object.c (rb_class_real): do not dereference 0 VALUE
* test/ruby/test_module.rb (test_inspect_segfault):
Test case and bug report by Thomas Stratmann.
[ruby-core:65214] [Bug #10282]
Anonymous
08:29 PM Revision 0ef94bd2 (git): object.c (rb_class_real): do not dereference 0 VALUE
* test/ruby/test_module.rb (test_inspect_segfault):
Test case and bug report by Thomas Stratmann.
[ruby-core:65214] [Bug #10282]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
08:18 PM Feature #10197 (Closed): document RUBY_* stack size/GC params in ruby.1 manpage
Applied in changeset r47713.
----------
man/ruby.1: document stack size env variables
[Feature #10197]
Anonymous
08:18 PM Revision e0f02160 (git): * 2014-09-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:18 PM Revision 446a5417 (git): man/ruby.1: document stack size env variables
[Feature #10197]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
04:52 PM Bug #10142: named params don't always capture passed named args
another example of how this creates surprise, confusion and subtle bugs
~~~ruby
def foo(a = 1, **options)
end
foo opt: 2
~~~
_____________
if 'a' becomes mandatory, instead of raising, "a" will absorb the options, which is c...
rits (First Last)
03:44 PM Bug #10167: Prime#include?(mod) hangs up
Review my patch, please! nitoyon (Kenichi Saita)
10:47 AM Feature #10295 (Closed): [PATCH] io.c (fptr_finalize): free memory (before GC sweep)
Note: just committed r47712 which was trivial.
This passes tests, too, but I would appreciate another set of eyes
in case there's a subtle finalization issue I'm missing.
This releases memory on explict calls to rb_io_close,
reduci...
normalperson (Eric Wong)
10:40 AM Revision 405c4abb (git): io.c: common function to free IO buffers
This also allows easier tracking of freed memory for systems
without malloc_usable_size, and also makes future changes
to freeing buffer memory easier-to-implement.
* io.c (free_io_buffer): new function for a common pattern
(clear_rea...
Eric Wong
05:18 AM Bug #10290: segfault when calling a lambda recursively after rescuing SystemStackError
As I noted, running the example code on trunk does not segfault (it raises SystemStackError a second time, as I would expect):
```
$ ruby -ve "l = -> { l.() }; begin; l.(); rescue SystemStackError; l.(); end"
ruby 2.2.0dev (2014-09-...
Anonymous
05:11 AM Bug #10290: segfault when calling a lambda recursively after rescuing SystemStackError
I've attached the OS X crash report. Anonymous
01:44 AM Bug #10293: splatting an empty hash in a method invocation sends an argument to the method (should send nothing)
https://bugs.ruby-lang.org/issues/9291 is somewhat related
foo(**nil) should not raise since foo(*nil) does not and it's the more useful behavior
rits (First Last)
12:18 AM Bug #10293 (Assigned): splatting an empty hash in a method invocation sends an argument to the method (should send nothing)
nagachika (Tomoyuki Chikanaga)
12:34 AM Bug #10294 (Closed): Dir[] cannot be called with an array argument
The documentation for `Dir[]` claims that it can be called with an array and it will behave like Dir.glob:
```
Dir[ array ] → array
Dir[ string [, string ...] ] → array
Equivalent to calling Dir.glob(array,0) and Dir.glob([string,....
Anonymous
 

Also available in: Atom