Activity
From 02/15/2017 to 02/21/2017
02/21/2017
-
11:21 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- I am confused by your solution in comment #3. By your own report, there is no issue for numbers much larger than a single word. But this code is clearly appropriate only for single-word inputs.
-
06:21 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- You might want to consider the following articles:
https://www.reddit.com/r/algorithms/comments/1zt63v/fast_algorithm_to_calculate_integer_square_root/
Which lead me to wikipedia:
https://en.wikipedia.org/wiki/Methods_of_computing_squ... -
09:07 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- I just noticed this thread. One bit per cycle methods are not fast by modern methods, they are quite slow. I will attempt to have something more concrete within 24 hours.
Nathan Zook
-
08:45 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- I updated my **roots** rubygem to 2.0.0 to include **iroot2** and **irootn**.
https://rubygems.org/gems/roots
https://github.com/jzakiya/roots -
02:27 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- Is there many application for this method?
Concrete examples may help to persuade matz.
Another important problem is the method name.
If we use same name for same functionality in other languages/libraries,
it makes learning this ... -
07:11 PM Bug #13152: Numeric parsing differences between ruby <-> crystal
- The comparison with other programming languages is kind of interesting, but the main argument IMO for
the implemented behavior hasn't been mentioned:
We are talking about mathematical operations here, and in **mathematics**, the expr... -
03:35 PM Bug #13238 (Closed): string.c assertion fails after attempting to modify singleton class of a frozen string
-
02:51 PM Revision f2c5146d (git): object.c: message encoding
- * object.c (rb_obj_clone2): preserve encoding in error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:42 PM Revision f5faaf7b (git): backward.h: RClassDeprecated
- * include/ruby/backward.h (RClassDeprecated): move from
ruby/ruby.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:27 PM Bug #13239 (Feedback): Bug with "special exceptions" when they are thrown in context of a rescue clause.
- It has been fixed at r57415, I think.
-
06:22 AM Bug #13239: Bug with "special exceptions" when they are thrown in context of a rescue clause.
- Oops, wrong link to the ruby fork.
Here's the right one: https://github.com/NickolasVashchenko/ruby/commits/special_exc_cause_bug -
06:19 AM Bug #13239 (Closed): Bug with "special exceptions" when they are thrown in context of a rescue clause.
- I've stumbled upon a case when ruby is supposed to throw "IOError: stream closed"(https://github.com/ruby/ruby/blob/trunk/thread.c#L4823) because there was a retained FD lock by another thread, but I'm was getting this instead of it:
... -
12:09 PM Bug #13236 (Feedback): Ruby segfault
- Could you enable debugging?
- 08:18 AM Revision 6699debd (git): * properties.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
08:18 AM Revision 76c4cca1 (git): add performance counting mechanism for MRI debug/tuning purpose.
- * How to enable this feature?
* define USE_DEBUG_COUNTER as 1.
* you can disable to output the result with
RUBY_DEBUG_COUNTER_DISABLE environment variable
even if USE_DEBUG_COUNTER == 1.
* How to add new counter?
* add COU... -
06:16 AM Revision 51de3aa2 (git): backward.h: move deprecated declaration
- * include/ruby/backward.h (rb_autoload): move declaration of
deprecated function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
06:16 AM Revision cd0426c0 (git): variable.c: remove deprecated internal feature
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
06:07 AM Revision f922f1cb (git): error.c: remove deprecated internal features
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
06:07 AM Revision f4c2b33e (git): complex.c: remove deprecated functions
- * complex.c (rb_complex_set_real, rb_complex_set_imag): remove
functions deprecated at 2.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:17 AM Revision 556a1352 (git): backward.h: 2.2 deprecated features
- * include/ruby/backward.h (DECLARE_DEPRECATED_FEATURE): move
features deprecated at 2.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:16 AM Revision bd26c796 (git): internal.h: removed function declaration
- * internal.h (rb_compile_error_str): remove declaration of removed
internal function at r54189.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:49 AM Bug #13225 (Assigned): [DOC] expand docs for Date shifting
- to Matz
He is the main maintainer of www.r-l.o and sends a lot of patches to ruby core.
I will recommend him to the ruby committer.
How do you think? -
01:28 AM Revision a9c15229 (git): variable.c: noreturn in GCC
- * variable.c (rb_generic_ivar_table): declare as noreturn only in
GCC, which does not err on different attributes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
02/20/2017
-
11:50 PM Bug #13238 (Closed): string.c assertion fails after attempting to modify singleton class of a frozen string
- Hi,
The following code causes an assertion failure in 2.3.3. Create two files, `bug.rb` and `not_frozen.rb`:
bug.`rb`:
~~~ ruby
s = 'abc'.freeze
def s.something; end rescue nil
require_relative 'not_frozen'
~~~
`not_f... -
08:56 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- Here's the README.md writeup on the general integer roots algorithm.
At the cpu level, all these bit operations -- >>, <<, |, ^ -- are one clock cycle instructions,
so you see this can be very fast if done in C. Maybe for arbitrary... -
07:02 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- No, no, I didn't take it as a negative comment per se,
I just hadn't tried to use **BigDecimal** before, so I just went ahead and
created tests to see for myself how they performed (accuracy and speed).
Ruby has a much nicer communi... -
04:49 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- @Jabari Note that my comments were not meant as arguments against your feature request, I only wanted to point out the reasons for the observed behavior. Personally, I always welcome improved math functionality; however, I'm not informed...
-
05:04 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- ```ruby
class Integer
def irootn(n)
return nil if self < 0 && n.even?
raise "root n is < 2 or not an Integer" unless n.is_a?(Integer) && n > 1
num = self.abs
bits_shift = (num.bit_length)/n + 2
root, bitn_ma... -
04:27 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- One if the really nice things about Ruby is its intent to make users/programmers happy,
and to adhere to the "principle of least surprises (pols)".
I don't think it was the intent of Matz to create math methods that give correct resu... -
08:52 PM Bug #13237 (Closed): Behavior for #dup and #clone on Rational/Complex/BigDecimal differs from Integer/Float
- Since the implementation of feature #12979, #dup and #clone on Integer and Float do not raise a `TypeError` anymore, and silently return self. Rational and Complex still raise an exception.
I'm not sure whether this inconsistent behav... - 07:12 PM Revision 9291d3d3 (git): * 2017-02-21
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
07:12 PM Revision 56c38a64 (git): remove harmful declaration.
- * variable.c (gen_ivtbl_get): declaration conflict on VC++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
07:00 PM Bug #13236: Ruby segfault
- Some bugs are just like that - they exist somewhere out there but they are hard
to find or reproduce. Almost real heisenbugs. :) -
05:20 PM Bug #13236: Ruby segfault
- Damien Robert wrote:
> The code is in https://github.com/DamienRobert/drain
> ...
PS: I apologize that I was not able to get a minimal working example. I tried to do so in 'test_graph_segfault.rb' but it does not segfault. However remo... -
05:11 PM Bug #13236 (Closed): Ruby segfault
- I have a program that segfault under certain conditions. It does not happen often, so it is hard to get the segfault.
The code is in https://github.com/DamienRobert/drain
You can run 'rake test' to (sometime, not often) get the core du... -
04:43 PM Bug #13234: Infinite recursion (stack overflow) in parse_char_class()
- Shyouhei Urabe wrote:
> Kamil Frankowicz wrote:
> ...
I fuzz ruby (in this case miniruby binary) with American Fuzzy Lop fuzzer (http://lcamtuf.coredump.cx/afl/). My testing corpus contains files from various open source projects writt... -
09:46 AM Bug #13234 (Closed): Infinite recursion (stack overflow) in parse_char_class()
- Applied in changeset r57660.
----------
regparse.c: initialize return values
* regparse.c (parse_char_class): initialize return values before
depth limit check. returned values will be freed in callers
regardless the error. [ruby... -
08:55 AM Bug #13234: Infinite recursion (stack overflow) in parse_char_class()
- Kamil Frankowicz wrote:
> After some fuzz testing I found a crashing test case.
Great... I can reproduce this. Not sure if this is an "infinite" recursion or just too deep to run on my machine, though.
Do you run a fuzz test for... -
07:38 AM Bug #13234 (Closed): Infinite recursion (stack overflow) in parse_char_class()
- After some fuzz testing I found a crashing test case.
Git HEAD: fbd5cda6aad6db01bbca3d893a9970314a1bd52c
To reproduce: miniruby ruby_so_parse_char_class
Error log: bug-13234.log
-
03:43 PM Bug #13229: [DOC] Add document title for extension.rdoc
- Thanks for the translation, kazu!
-
12:20 PM Bug #13229 (Closed): [DOC] Add document title for extension.rdoc - Applied in changeset r57665.
----------
extension.rdoc: add document title
* doc/extension.rdoc, doc/extension.ja.rdoc: [DOC]
add title and adapt subheading levels.
* doc/extension.rdoc: [DOC] fix subheading level of section
about... -
02:44 PM Bug #13235 (Closed): [BUG] Segmentation fault at 0x00000000000038
- -- Control frame information -----------------------------------------------
c:0129 p:0045 s:0826 e:000823 METHOD /Users/derickhoganpimenta/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/forwardable.rb:228
c:0128 p:0038 s:0817 E:0024b8 BLOCK /... -
02:40 PM Revision 2235695c (git): compile.c: Fix a typo
- * compile.c (compile_branch_condition): NODE_LIT is
always true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:20 PM Revision 7010dc6f (git): extension.rdoc: add document title
- * doc/extension.rdoc, doc/extension.ja.rdoc: [DOC]
add title and adapt subheading levels.
* doc/extension.rdoc: [DOC] fix subheading level of section
about "Ruby Constants That Can Be Accessed From C".
* doc/extension.ja.rdoc: [DOC... -
10:59 AM Revision 11eba07b (git): Supress warning: function might be candidate for attribute 'noreturn'
- GCC7 shows it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:59 AM Revision c022a097 (git): Cast as VALUE to suppress type warnings
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
10:59 AM Revision 1220638f (git): They are enum yytokentype, need cast
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
10:10 AM Revision a9925e22 (git): assertions.rb: ignore exit in child
- * test/lib/test/unit/assertions.rb (assert_separately): ignore
SystemExit. unsuccessful exit still fails an assertion later.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
09:46 AM Revision ea940cc4 (git): regparse.c: initialize return values
- * regparse.c (parse_char_class): initialize return values before
depth limit check. returned values will be freed in callers
regardless the error. [ruby-core:79624] [Bug #13234]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57... -
05:35 AM Revision f28de8c0 (git): parse.y: new_qcall
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
05:35 AM Revision 35ac7cc0 (git): parse.y: ID2VAL
- * parse.y (ID2VAL): split from TOKEN2VAL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:35 AM Misc #13230: Better Do ... while structure
- Probably it equals:
```cpp
unsigned b=0;
do {
cout<<a[b];
if (!(++b<10)) break;
cout<<',';
} while (1);
```
or
```cpp
for (unsigned b=0; cout<<a[b], (++b<10);) {
cout<<','... -
05:11 AM Misc #13230 (Feedback): Better Do ... while structure
- I'm sorry but I have to say I don't understand how the construct works. Looking at the original site there is an example:
```cpp
/* author: ncomputers.org */
#include<iostream>
using namespace std;
int main(){
unsigned a[]... -
05:08 AM Bug #13233: [DOC] Fix rdoc for Rational
- Sorry, forgot the attachment.
-
02:53 AM Feature #13221: [PATCH] gems/bundled_gems: add "curses" RubyGem
- Hiroshi SHIBATA wrote:
> I have no opinion this.
> ...
I'm neutral, but note that PDCurses is bundled with binary gems for Windows.
-
12:13 AM Feature #13221: [PATCH] gems/bundled_gems: add "curses" RubyGem
- I have no opinion this.
>nalsh, shugo
How do you think this? - 02:16 AM Revision 6649e4c5 (git): * 2017-02-20
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:16 AM Revision fca3cf66 (git): envutil.rb: diagnostic_reports for ruby-runner
- * test/lib/envutil.rb (EnvUtil.diagnostic_reports): ruby-runner
execs "RUBY_INSTALL_NAME" file, so search by that name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
02/19/2017
-
11:41 PM Feature #13221: [PATCH] gems/bundled_gems: add "curses" RubyGem
- > I'm concerned about the increasing tendency to unbundle core functionality (`curses`, `tcl/tk`, ...; and possibly soon also `date`).
I also share this concern.
This is one discussion I've been keen to start with the creation of
... -
11:19 PM Bug #13233 (Feedback): [DOC] Fix rdoc for Rational
- No patch?
-
07:38 PM Bug #13233 (Closed): [DOC] Fix rdoc for Rational
- ```
rational.c: fix rdoc
* rational.c: [DOC] fix wrong indentations and comment out some lines
in code examples to make them valid Ruby code and syntax highlighted
on the rendered page.
``` -
08:34 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- To clarify further the limitations of using Float here:
``` ruby
n = 10**35
Math.sqrt(n).to_i # => 316227766016837952
Math.sqrt(n).next_float.to_i # => 316227766016838016
```
BigDecimal / BigMath should be ab... -
07:30 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- After further testing I found the same errors when using **`Math.sqrt(n).to_i`** with
large number when using `(n**(1.0/2)).to_i`. This reinforces to me the need to provide
**`sqrt_i`** (by whatever name) so users won't fall prey to t... -
01:05 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- To be clear, I am not saying **`Math.sqrt`** has a bug in it.
As stated, it produces a floating point result, which inherently has finite (not infinite) precision.
The "bug", or more accurately, the realization of the limitations of ... -
09:42 AM Bug #13232 (Assigned): Comparing BigDecimal to float or Rational fails sometimes
- Seems correct to me.
-
03:51 AM Bug #13232 (Closed): Comparing BigDecimal to float or Rational fails sometimes
- Under very special cases trying to compare a BigDecimal to a float or Rational will give an unexpected result:
irb> BigDecimal('1') < 1e-10
=> true
I couldn't find a sequence of steps which reproduces the problem with 100%... -
01:52 AM Bug #13231 (Closed): DateTime.strftime("%Z") does not return time zone abbreviation, returns hour and minute offset from UTC with colon
- First time here; hope I capture everything.
It appears to me that either the documentation is incorrect or the expected functionality with `DateTime.strftime("%Z")`.
From: http://ruby-doc.org/stdlib-2.3.1/libdoc/date/rdoc/DateTim... -
01:29 AM Misc #13230 (Rejected): Better Do ... while structure
- I just saw this, and thought I'd pass it along.
http://ncomputers.org/suggestions/do%20while.cpp
```
Do ... while structure improvement
Sometimes the use of jumps such as: continue, break, goto, call to a function, etc. is necess... -
01:27 AM Bug #13227 (Closed): Crash when refine subclass method and call super
- Applied in changeset r57655.
----------
vm_insnhelper.c: super to module in refinement
* vm_insnhelper.c (vm_call_zsuper): method defined in module in
refinement is not callable as-is. dispatch again.
[ruby-core:79588] [Bug #13227] -
01:27 AM Revision 4d47e8d9 (git): vm_insnhelper.c: super to module in refinement
- * vm_insnhelper.c (vm_call_zsuper): method defined in module in
refinement is not callable as-is. dispatch again.
[ruby-core:79588] [Bug #13227]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57655 b2dd03c8-39d4-4d8f-98ff-823fe6... -
01:12 AM Bug #13228: s[i]=c(assigning a character) for String is slower than Array on Linux
- `perf` shows that ruby spent most of the time in `search_nonascii()`.
```
$ perf record ruby -ve 'n=100000; s = "a" * n; t = Time.now; n.times do |i| s[i] = "z"; end; p Time.now - t'
ruby 2.5.0dev (2017-02-18 trunk 57652) [x86_64-li...
02/18/2017
- 10:38 PM Revision 7e5140e2 (git): * 2017-02-19
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
10:38 PM Revision 9cbe4553 (git): COPYING: expand tabs
- * COPYING: expand tabs like as the rest lines. [Fix GH-1526]
Author: Philippe Ombredanne <pombredanne@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:34 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- Robert A. Heiler wrote:
> If it would be a bug, as behaviour, why should `Math.sqrt()` itself not be able
> ...
Expected results differ.
`Math.sqrt()` is expected to return a `Float` with much precision as possible.
While the propose... -
05:06 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- I can not evaluate whether the above is correct or not (not saying that it is not,
I just simply do not know), but I believe that method names such as "`intsqrt2`" or
"`intsqrt`" may possibly not be an ideal choice, due to the name alo... -
07:05 PM Misc #13072: Current state of date standard library
- > date library will be separeted from Ruby repository (stdlib) to date.gem
I think the concept of date (without time) is so important that it should not simply be unbundled into a gem.
I'm concerned about the increasing tendency to... -
06:40 PM Feature #13221: [PATCH] gems/bundled_gems: add "curses" RubyGem
- _PS. A quote from a recent post (not by me) in ruby-talk:_
> I do not use Ruby anymore when I develop GUI applications; the community is so focused on web (Rails) stuff that anything else is starving. I happily use it for some simple ... -
06:26 PM Feature #13221: [PATCH] gems/bundled_gems: add "curses" RubyGem
- I'm concerned about the increasing tendency to unbundle core functionality (`curses`, `tcl/tk`, ...; and possibly soon also `date`).
I fear that Ruby will loose some of its usability and attractiveness as an all-purpose language, espe... -
05:16 PM Feature #13221: [PATCH] gems/bundled_gems: add "curses" RubyGem
- Here is the link to when curses was removed:
https://bugs.ruby-lang.org/issues/8584
I guess this is where two different mindsets collide - to make a very
small core distribution but then provide various add-ons when the
user wa... -
05:07 PM Bug #13229: [DOC] Add document title for extension.rdoc
- I guess there is no shortage on developers who are able to use written japanese AND written
english. :) -
03:02 PM Bug #13229: [DOC] Add document title for extension.rdoc
- The current "title" of the extensions guide is "Basic Knowledge"...
Note that a contribution from a Japanese speaking maintainer would still be needed for this patch; there are two headings that need translation:
* "Creating Extens... -
03:01 PM Bug #13229 (Closed): [DOC] Add document title for extension.rdoc
- ```
extension.rdoc: add document title
* doc/extension.rdoc, doc/extension.ja.rdoc: [DOC]
add title and adapt subheading levels.
* doc/extension.rdoc: [DOC] fix subheading level of section
about "Ruby Constants That Can Be A... -
03:27 PM Bug #13220: Enhance support of Unicode strings manipulation
- I tested all cases with normalized strings and they works except this examples:
"١".to_f and other to numeric conversion.
Unicode character is arabic-inding digit one. but i think it is ok because any japan numerals like 一 (ichi) a... -
02:59 PM Bug #13220: Enhance support of Unicode strings manipulation
- Shyouhei Urabe wrote:
> Radovan Smitala wrote:
> ...
This new information appears on blogpost:
> NOTE: After publication, some readers pointed out that many of the failures I mentioned wouldn't have happened if I would have normaliz... -
02:37 PM Bug #13228 (Rejected): s[i]=c(assigning a character) for String is slower than Array on Linux
- `s[i]=c`(assigning a character) for `String` is slower than for `Array` on Linux.
If I split the `String` to `Array`, and assign characters, and join the `Array` to `String`,
then it is much faster than assigning characters directly ... -
12:29 PM Bug #13227 (Closed): Crash when refine subclass method and call super
- Test script:
test.rb
~~~ ruby
class Parent
end
class Child < Parent
end
module FooBar
refine Parent do
def to_s
"Parent"
end
end
refine Child do
def to_s
super + " -> Child"
en... -
12:27 PM Bug #13226 (Closed): SIDEKIQ WORKER GETS KILLED
- More likely [Bug #12292]. Please reopen if upgrading to Ruby 2.3.3 does not fix.
[Bug #12993] was an issue specific to OpenSSL 1.1.0c which Ruby 2.3 does not compile with. -
11:30 AM Bug #13226: SIDEKIQ WORKER GETS KILLED
- Maybe [Bug #12993]?
-
11:02 AM Bug #13226 (Closed): SIDEKIQ WORKER GETS KILLED
- ```
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/openssl/buffering.rb:322: [BUG] Segmentation fault at 0x007fb7740000a8
-
08:50 AM Bug #13225 (Closed): [DOC] expand docs for Date shifting
- ```
ext/date/date_core.c: [DOC] expand docs for Date shifting
* add examples for Date#>> and Date#<< that clarify some edge cases
* add examples for Date#next_year and Date#prev_year
* add cross references to Date#>> and Date#<<
`... -
05:52 AM Revision fbd5cda6 (git): {lib,test}/cgi: Specify frozen_string_literal: true.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
04:23 AM Bug #13222 (Closed): Array#sum inconsistency when init value is non-numeric
- Applied in changeset r57651.
----------
array.c: check if numeric
* array.c (finish_exact_sum): add 0 and the initial value to check
if the latter is numeric. [ruby-core:79572] [Bug #13222] -
04:23 AM Revision 3203ae53 (git): array.c: check if numeric
- * array.c (finish_exact_sum): add 0 and the initial value to check
if the latter is numeric. [ruby-core:79572] [Bug #13222]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 03:42 AM Revision ca820606 (git): * 2017-02-18
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:42 AM Revision 7dccda43 (git): array.c: finish_exact_sum
- * array.c (finish_exact_sum): extract duplicate code from
rb_ary_sum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:55 AM Bug #13223: `File.join` will segv if File::SEPARATOR and File::Separator are set.
- @nobu I went by what the documentation says:
~~~
/*
* call-seq:
* File.join(string, ...) -> string
*
* Returns a new string formed by joining the strings using
* -
01:48 AM Bug #13223: `File.join` will segv if File::SEPARATOR and File::Separator are set.
- I doubt that the tests are expected results.
And a similar pattern:
```ruby
$; = " "
$a = nil
alias $; $a
alias $-F $a
GC.start
"".split
```
02/17/2017
-
11:19 PM Feature #13224 (Closed): Add FrozenError as a subclass of RuntimeError
- Currently, attempting to modify a frozen object leads to a `RuntimeError` exception. Unfortunately, this means it is not easy to differentiate exceptions raised from attempting to modify frozen objects from generic exceptions such as ca...
-
10:24 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- A new version **`intsqrt3`** is one line shorter, and more intuitive (to me)
but there is a neglible difference in speed versus **`intsqrt2`** in Ruby.
Maybe it's faster in C?
```ruby
def intsqrt(n)
bits_shift = (n.to_s(2).size)... -
05:47 PM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- This works well in my code.
Easier to code and read with accurate results.
```ruby
class Integer
def sqrt_i
self <= MAX_RANGE ? Math.sqrt(self).to_i : intsqrt(self)
end
private
MAX_RANGE = 9_999_899_999_... -
04:01 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- I just realized **`class Integer`** has a **`bit_length`** instance_method.
It makes the code a bit simpler, easier to understand, and faster.
```ruby
def intsqrt(n)
bits_shift = (n.to_s(2).size)/2 + 1
bitn_mask = root = 1 << ... -
03:34 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- This is the C version of the algorithm.
I put the part before the start of the **while** loop of the ruby
version to make it applicable for arbitrary size integers.
http://www.codecodex.com/wiki/Calculate_an_integer_square_root
... -
12:57 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- Since this method is designed to operate on integers it would be nice to make it
a **`class Integer`** method, then you can do this: `4829391.sqrt_i`
(or whatever name it's given), which allows you to easily do method chaining. -
12:32 AM Feature #13219: bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- On my 64-bit Linux OS laptop with an I7 cpu, I tested that **`Math.sqrt(n).to_i`** gives correct
answers from `(0..9_999_899_999_899_999_322_536_673_279)`. This was also the same on JRuby-9.1.7.0.
Thus, I can create a hybrid method t... -
06:27 PM Bug #13223 (Closed): `File.join` will segv if File::SEPARATOR and File::Separator are set.
- The program below will crash with a segv:
~~~ruby
File.const_set :Separator, "hello"
File.const_set :SEPARATOR, "hello"
GC.start
File.join "hello", "world"
~~~
This is because the separator object is referenced from a glob... -
03:43 PM Bug #13102: Confusing method name: Set#delete?
- I was referring to the use of bang [method names](http://ruby-doc.org/core-2.4.0/doc/syntax/methods_rdoc.html#label-Method+Names) in the Ruby core library:
> [...] In ruby core library the dangerous method implies that when a method e... -
03:34 PM Bug #13102: Confusing method name: Set#delete?
- Stefan Schüßler wrote:
> Not really, `Set#delete` also modifies the receiver.
> ...
Let me point you to this explanation on the use of bang in ruby method names: https://www.ruby-forum.com/topic/176830#773946
It is perpetually misunde... -
01:31 PM Revision 3d031cea (git): test_fileutils.rb: no broken symlinks on Cygwin
- * test/fileutils/test_fileutils.rb (no_broken_symlink): exclude
test using broken symlinks on Cygwin, which are not allowed
because of the directory flag of Windows native symlink.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5... -
01:31 PM Revision 1b4df625 (git): test_fileutils.rb: fix relative symlink path
- * test/fileutils/test_fileutils.rb (test_rm_symlink): fix relative
symlink path, the target should be relative to the directory in
which the symlink gets created.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57647 b2dd03c8-39d4... -
11:56 AM Feature #13172: Method that yields object to block and returns result
- .patch file
-
11:23 AM Bug #13220: Enhance support of Unicode strings manipulation
- Radovan Smitala, an example for splitting up into subsections could be seen here:
https://bugs.ruby-lang.org/issues/5481
This would make it easier for the ruby core team to fix any of the issues (if they
are issues at all in the... -
08:21 AM Bug #13220: Enhance support of Unicode strings manipulation
- Note that these results are in NFD.
It seems to result as expected by using NFC. -
07:44 AM Bug #13220: Enhance support of Unicode strings manipulation
- Radovan Smitala wrote:
> It's not my blog post. But when i tried some testing cases they were really wrong and unexpected.
Can you, then, show us your testing cases so that we can look at the "wrong and unexpected" results? -
06:33 AM Bug #13220: Enhance support of Unicode strings manipulation
- Yes i know its little bit large issue.
I'm not sure how to handle it and separate problematic parts into content blocks.
Or just bug by bug what is 33 issues.
It's not my blog post. But when i tried some testing cases they were re... -
02:31 AM Bug #13220 (Feedback): Enhance support of Unicode strings manipulation
- Can you split this request into several ones? Because what this ticket aims is a bit too large and perhaps vague. It is advised that you should create an issue with an obvious goal.
For instance if you believe String#[] understand u... -
11:00 AM Bug #11567: Segmentation fault CFUNC :gets
- I'm having the same problem. Running the code as it is, I get reproducible crashes with both Ruby 2.3.1 and 2.4.0:
~~~
test.rb:18: [BUG] Segmentation fault at 0x00000000000000
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
... -
10:59 AM Bug #13222 (Closed): Array#sum inconsistency when init value is non-numeric
- Since Array#sum skips calling plus for `0` https://github.com/ruby/ruby/blob/c85a58d/array.c#L5831-L5832, it doesn't raise when the receiver array consists of 0 only, even when the "init" value is non-numeric.
```
% ruby -e "p [1].su... -
10:22 AM Revision c85a58d5 (git): test_fileutils.rb: workaround for Cygwin
- * test/fileutils/test_fileutils.rb (root_in_posix): seems Cygwin
has some different conditions for privilege.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:22 AM Revision 1ac36ecf (git): test_fileutils.rb: cache distinct UIDs
- * test/fileutils/test_fileutils.rb: cache distinct UIDs as
constants at initialization. assume no UIDs will be
added/removed during tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 05:45 AM Revision 68319db7 (git): * 2017-02-17
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
05:45 AM Revision 6877de73 (git): DEPRECATED_INTERNAL_FEATURE
- * error.c (ruby_deprecated_internal_feature): renamed, to
explicitly represent deprecation.
* internal.h (DEPRECATED_INTERNAL_FEATURE): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:31 AM Feature #13221 (Closed): [PATCH] gems/bundled_gems: add "curses" RubyGem
- This was part of the standard library in Ruby 2.0 and earlier;
and some users may still expect it to be in the standard
install.
02/16/2017
-
10:34 PM Bug #13220 (Feedback): Enhance support of Unicode strings manipulation
- Hi,
last days, Starr Horne posted very interesting testing results about manipulation unicode strings in Ruby 2.4.
And many methods doesn't work as excepted.
Article:
http://blog.honeybadger.io/ruby-s-unicode-support/ -
10:19 PM Feature #13219 (Closed): bug in Math.sqrt(n).to_i, to compute integer squareroot, new word to accurately fix it
- In doing a math application using **Math.sqrt(n).to_i** to compute integer squareroots
of integers I started noticing errors for numbers > 10**28.
I coded an algorithm that accurately computes the integer squareroot for arbirary s... -
06:52 PM Bug #13215: Cross compiling Ruby Gems uses Build System Linker Options
- Thanks. I created a ticket in their tracker: https://github.com/rubygems/rubygems/issues/1840
-
07:47 AM Bug #13215: Cross compiling Ruby Gems uses Build System Linker Options
- RubyGems is bundled but not a part of Ruby.
The upstream is https://github.com/rubygems/rubygems.
I have never cross-compiled gems with extension libraries. -
02:48 PM Revision 14d61a94 (git): variable.c: fatal rb_generic_ivar_table
- * variable.c (rb_generic_ivar_table): raise fatal error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:34 PM Bug #13218 (Feedback): testing
- Please post the whole message.
And 2.3.0p0 is outdated, try 2.3.3. -
12:51 PM Bug #13218 (Rejected): testing
- I am following the Rails Tutorial e-book (https://www.railstutorial.org/book/modeling_users). I have reached chap6, where we must validity tests for user e-mails. I reached listing 6.23 added this line of code (`VALID_EMAIL_REGEX = /\A[\...
-
11:54 AM Bug #13217: JSON.parse() chokes on the UTF-8 character EM SPACE (U+2003, e2 80 83)
- Martin Dürst wrote:
> RFC 7159 defines what's allowed as spaces between data. Please see the 'ws' production at https://tools.ietf.org/html/rfc7159#section-2, which lists only the following four:
> ...
Okay, thanks for the json lesson! -
11:44 AM Bug #13217 (Rejected): JSON.parse() chokes on the UTF-8 character EM SPACE (U+2003, e2 80 83)
- RFC 7159 defines what's allowed as spaces between data. Please see the 'ws' production at https://tools.ietf.org/html/rfc7159#section-2, which lists only the following four:
```
ws = *(
%x20 / ; Space
... -
11:29 AM Bug #13217 (Rejected): JSON.parse() chokes on the UTF-8 character EM SPACE (U+2003, e2 80 83)
- ### Steps to reproduce
No error here:
```
require 'json'
json = %Q{
["a", "b"]
}
obj = JSON.parse(json)
```
But there is a UTF-8 space character called `EM SPACE` (U+2003, e2 80 83), which looks like a regular ascii... -
09:15 AM Revision ccc388d8 (git): use rb_iseq_check() for USE_LAZY_LOAD, too.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
08:42 AM Bug #13214 (Closed): FileUtils::mkdir_p creates additional (unrequested) directory on Cygwin
- Applied in changeset r57640.
----------
fileutils.rb: do not make root
* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
directory which should be exist and cannot be made with mkdir
recent Cygwin can make a directory co... -
08:42 AM Revision 3261cfd8 (git): fileutils.rb: do not make root
- * lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
directory which should be exist and cannot be made with mkdir
recent Cygwin can make a directory contains a colon.
[Bug #13214]
git-svn-id: svn+ssh://ci.ruby-lang.org/ru... -
08:24 AM Revision a1738430 (git): use rb_iseq_check() for USE_LAZY_LOAD.
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
08:03 AM Bug #13216: Possible unexpected behaviour reading string starting with a byte order mark
- Shyouhei Urabe wrote:
> > $ echo -n -e '\xEF\xBB\xBFid' | ruby -e 'puts STDIN.read.bytes.pack("U")'
> ...
Not a bug.
`pack("U")` packs just one codepoint, and U+00EF is LATIN SMALL LETTER I WITH DIAERESIS, which is the printed exact... -
01:41 AM Bug #13216: Possible unexpected behaviour reading string starting with a byte order mark
- Hello.
Gabriel Giordano wrote:
> $ echo -n -e '\xEF\xBB\xBFid' | ruby -e 'puts STDIN.read.bytes'
> ...
These two are as expected, aren't they?
> $ echo -n -e '\xEF\xBB\xBFid' | ruby -e 'puts STDIN.read.to_sym'
> ...
I think it's... - 02:47 AM Revision f4e0086d (git): * 2017-02-16
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:47 AM Revision 9019934c (git): win32.c: memcpy instead of strlcpy
- * win32/win32.c (cmdglob): memcpy the exact size instead of
strlcpy with +1.
* win32/win32.c (w32_cmdvector): ditto, with NUL-terminating.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:33 AM Feature #7792: Make symbols and strings the same thing
- > result = some.rpc_method(foo:123, bar:"baz")
> ...
I believe it is time now with the advent of Ruby 3 to revisit this feature request.
Although maybe not quite like it is stated right now.
What are your feelings about it? -
02:21 AM Feature #7792: Make symbols and strings the same thing
- Hi Daniel,
Daniel Ferreira wrote:
>
> ...
I've continued using the aforementioned RPC system without enabling
the setting that would allow it to recreate symbols on the receiving
end.
So it continues to work as it did before (i... -
01:22 AM Feature #7792: Make symbols and strings the same thing
- Hi Bill
> One example:
> ...
With symbols being garbage collected now is this functionality broken or are you still relying on symbols over strings for your solution?
Thanks,
Daniel
02/15/2017
-
08:58 PM Bug #13216 (Closed): Possible unexpected behaviour reading string starting with a byte order mark
- Maybe the comparison between symbols has an unexpected behaviour. Tested with ruby 2.4.0
```
$ echo -n -e '\xEF\xBB\xBFid' | ruby -e 'puts STDIN.read.bytes'
239
187
191
105
100
$ echo -n -e 'id' | ruby -e 'puts STDIN.read.byt... -
04:41 PM Bug #13215: Cross compiling Ruby Gems uses Build System Linker Options
- If Rubygems (which I thought was part of Ruby now?) doesn't support cross-compiling Ruby gems, how do you cross-compile Ruby gems ?
-
07:17 AM Bug #13215 (Third Party's Issue): Cross compiling Ruby Gems uses Build System Linker Options
- Does rubygems support cross-compiling?
-
01:41 PM Feature #13211: Hash#delete taking a splat
- Okay, yes, an arbitrary number of arguments. Is this something to which people would be amenable?
-
12:10 PM Feature #13211: Hash#delete taking a splat
- Whether to accept a splat (perhaps on an array) at the beginning of an argument is not something to be specified as a method signature.
Your real issue is to let the method accept an arbitrary number of arguments.
Whether you pass ... -
11:17 AM Revision 12cccce6 (git): Update gems/bundled_gems
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
10:51 AM Revision 22510511 (git): gmake.mk: mflags without -jN
- * defs/gmake.mk (mflags): override the definition in common.mk
without -jN option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
08:51 AM Bug #13150: TestMarshal failures on FreeBSD with gcc7 because of GC
- Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
> On 2017/02/13 19:05, Nobuyoshi Nakada wrote:
> ...
Ah, thanks. I forgot this :x I saw you already made r57634.
Since callcc is obsolete, is the following patch OK; or can Fiber
have th... -
07:32 AM Bug #13150: TestMarshal failures on FreeBSD with gcc7 because of GC
- On 2017/02/13 19:05, Nobuyoshi Nakada wrote:
>> But in marshal.c, I think we can use `klass==0` to hide the object
> ...
Sorry, I missed that `arg` may be dereferenced in `check_dump_arg()`
in the case continuation is used. Hiding wr... -
08:38 AM Revision d9ae8c0b (git): marshal.c: revert r57631 partially
- * marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
may be dereferenced in check_dump_arg due to continuation, and
get rid of dangling pointers.
* marshal.c (rb_marshal_load_with_proc): ditto for load_arg.
git-svn-id... -
05:53 AM Revision cd891481 (git): thread.c: fix for VC
- * thread.c (rb_fd_no_init): make void same as rb_fd_init_copy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 12:42 AM Revision 87577a1f (git): * 2017-02-15
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 12:42 AM Revision 9f20ee51 (git): marshal.c: use hidden objects to allow recycling
- Hidden objects (klass == 0) are not visible to Ruby code invoked
from other threads or signal handlers, so they can never be
accessed from other contexts. This makes it safe to call
rb_gc_force_recycle on the object slot after releasing...