Activity
From 06/14/2019 to 06/20/2019
06/20/2019
-
11:53 PM Bug #14317 (Rejected): Date.strptime(..., "%U") fails if first day of the week is not in the 0th week.
- I do not think this is a bug. It is reasonable for `Date.strptime` to assume a value of 0/Sunday for `:cwday`/`%u` if `:wnum0`/`%U` is specified without `%u`. In every other case where you specify `%U` without `%u`, you get a Sunday. I...
-
11:36 PM Feature #14278: Ambiguous Exception for OpenSSL::HMAC.digest
- I do not think the current error message is a bug, and changing the message would be considered a feature. In general, Ruby TypeError messages are not completely descriptive as to the argument and method names. That is not specific to ...
-
11:09 PM Bug #14968: [PATCH] io.c: make all pipes nonblocking by default
- Eric do you mind explaining where we got to with this and how to move forward?
-
09:50 PM Bug #14358 (Assigned): URI.encode_www_form_component doesn't encode bad chars properly
- I agree this is a bug that should be fixed, and the patch is a proper way to fix it. Attached is an updated patch that applies against the master branch, along with a test.
-
08:27 PM Bug #14429 (Assigned): Overzealous escaping of + in Shellwords
- While the current code is not really a bug (Shellwords.escape does not guarantee to only escape when required), I agree it makes sense not to escape +. From what I read, in addition to Bourne sh, neither bash nor ksh require escaping +. ...
-
08:07 PM Bug #14376 (Closed): OpenSSL::X509::Store#verify_callback= requires Qtrue, not just truthy
-
08:04 PM Bug #14466 (Assigned): Errno::ECONNRESET or Errno::EPIPE raised instead of HTTPResponse returned when POSTing with large body
- I tried this example against an nginx instance, and received normal HTTP error codes (413 or 404 depending on payload size). However, on some other webservers (OpenBSD httpd and Webrick), I did see EPIPE failures in write_nonblock. Igno...
-
07:20 PM Feature #15777: autoload?(cname, inherit=true)
- > Is it necessary to export rb_autoload_at_p?
> ...
~~No I have no such plan. I did so because it's defined in `variable.c` but called from `load.c` so without that declaration it won't compile:~~
```
load.c:1180:12: error: implicit... -
06:49 AM Feature #15777: autoload?(cname, inherit=true)
- byroot (Jean Boussier) wrote:
> Let me know if you desire further changes.
Fix the bug first.
In `rb_autoload_at_p`, this condition is wrong.
```diff
- while (!autoload_defined_p(mod, id)) {
+ while (RTEST(recur) && autol... -
05:22 AM Feature #15777: autoload?(cname, inherit=true)
- Is it necessary to export `rb_autoload_at_p`?
Do you have the plan to use it in extension libraries? -
07:18 PM Feature #15936: on_error in lieu of rescue, raise
- duerst (Martin Dürst) wrote:
> kylemacey (Kyle Macey) wrote:
> ...
Very true! I can certainly do that, I just thought this might have the added benefit of writing more explicit and intentional code, and would eliminate the need to re-r... -
07:17 PM Feature #15936: on_error in lieu of rescue, raise
- jeremyevans0 (Jeremy Evans) wrote:
> kylemacey (Kyle Macey) wrote:
> ...
`ensure` fires even if there is no exception. This keyword would only fire when there is an exception. In your example, `job.fail!` would always be called.
Edi... -
07:00 PM Bug #14485: For File#path.tainted? and File#to_path.tainted? should match original.tainted?
- I agree that `File#path` should not be tainted unless the path given was tainted. Attached is a patch that fixes the issue
The code to always taint the result was added in commit:a4934a42cbb84b6679912226581c71b435671f55 in 2003 by ma... -
06:26 PM Bug #14539 (Closed): Duplicate range in character class warning
- This spurious warning appears in ruby 2.5.5, but not in ruby 2.6.3. Please upgrade to Ruby 2.6.3. This should be fixed in 2.5 if commit:179045acaf5de8398c321ada86a76f1afb77a796 is backported.
-
06:20 PM Revision fde842fe (git): Clean coroutine and timestamp directories
-
06:14 PM Bug #14569 (Feedback): Ruby dumps core involving XML file
- Can you try 2.5.5? It seems likely the problem is fixed there.
-
06:00 PM Bug #14612 (Assigned): IPv6 address inconsistency (downcase vs. upcase)
- I agree that Ruby should consistently use lowercase for IPv6 addresses. However, I don't think we should introduce a dependency on `ipaddr` to `resolv`. For one, it changes how the IPv6 addresses with noncontiguous 0 components are dis...
-
05:45 PM Bug #14614 (Feedback): Error when running `make update-gems`
- The error indicates `executable host ruby is required. use --with-baseruby option.` Does the error happen if you use the `--with-baseruby` option when configuring?
-
05:35 PM Bug #12289 (Third Party's Issue): Segmentation fault at 0x00000000000020 ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
- This was a bug in `curb`, apparently fixed by https://github.com/taf2/curb/commit/01b715a59fbd4914713104dbf04c1aece2bcdf82 according to https://github.com/taf2/curb/issues/342.
-
05:35 PM Bug #14774 (Third Party's Issue): Segmentation fault with Curb gem
- This was a bug in `curb`, apparently fixed by https://github.com/taf2/curb/commit/01b715a59fbd4914713104dbf04c1aece2bcdf82 according to https://github.com/taf2/curb/issues/342.
-
05:30 PM Bug #14795 (Closed): Should 'net/http' require 'net/http/status' ?
-
05:28 PM Bug #14822 (Closed): [POP3/SSL] net/protocol.rb:44: warning: verify_hostname requires hostname to be set
- Applied in changeset commit:git|4a5e07d8e17a0f62810f983114a88cb1011f971b.
----------
Avoid verbose warning when using Net::POP3 with SSL
Patch from Jos Kamphorst.
Fixes [Bug #14822] -
05:27 PM Bug #14822: [POP3/SSL] net/protocol.rb:44: warning: verify_hostname requires hostname to be set
- I can reproduce this issue, and have confirmed your fix removes the warning. It would have been helpful to mention that this warning is only printed in verbose mode. :)
- 05:28 PM Revision 2ee1c762 (git): * 2019-06-21
-
05:22 PM Revision 4a5e07d8 (git): Avoid verbose warning when using Net::POP3 with SSL
- Patch from Jos Kamphorst.
Fixes [Bug #14822] -
04:59 PM Bug #14848 (Rejected): Net/HTTP doesn't take verify_callback into account when OpenSSL::SSL::VERIFY_NONE
- I believe this is expected behavior and not a bug. From the man page for `SSL_CTX_set_verify` (https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_verify.html):
```
The verify_callback function is used to control the behaviour wh... -
03:35 PM Bug #15152 (Closed): Thread Crashes
-
03:34 PM Bug #15159 (Third Party's Issue): Some options of win32screenshot gem not working with Ruby 2.5.1.
- The segfault is in a external gem (rautomation) that uses FFI: https://github.com/jarmo/RAutomation/blob/7314a7e6f8bbba797d276ca1950abde0cba6897a/lib/rautomation/adapter/win_32/functions.rb#L18-L19
It looks very similar to a bug repor... -
03:27 PM Bug #15191 (Closed): Segfault in bignum.c bigtrunc()
-
02:39 PM Feature #15945: Option to truncate in `String#ljust`, `String#rjust`, and `String#center`
- I do not have any particular pro/con opinion per se as far as the feature itself
is suggested; if anything then I am mostly neutral, perhaps slightly positive as
I can see a (slight?) use case for it - I guess it depends a lot on the p... -
12:00 PM Feature #15945 (Open): Option to truncate in `String#ljust`, `String#rjust`, and `String#center`
- Sometimes, I need to adjust a string to an exact length: Pad if shorter, and truncate if longer. To do that, I need to combine two methods like this:
```ruby
"12".ljust(5, "*")[0, 5] # => "12***"
"1234567".ljust(5, "*")[0, 5]... -
01:27 PM Revision 93356576 (git): Revert "Removed needless file with the upstream repository."
- This reverts commit 5bbfca7b1d4be89d4728203b4610de17bccbefd7.
-
11:51 AM Revision 1f0762ad (git): Suppress messages from mkmf
- 11:12 AM Revision 9e7a8a43 (git): Only ignore build directories.
-
10:39 AM Bug #15841: SegFault in OpenSSL::PKey::RSA#private_encrypt
- I creaated a PR, https://github.com/ruby/openssl/pull/258 , about remaining issues.
> 2. if rsa.set_key had called without d argument, rsa.private? should return false.
- 10:36 AM Revision f607e433 (git): Transition root fiber into state FIBER_TERMINATED.
- During fork, it's possible that threads with root fibers are terminated,
but fiber state is not updated. `fiber_verify` will subsequently fail. We
forcefully enter the FIBER_TERMINATED state when terminating the root
fiber. -
09:20 AM Revision 3077cb69 (git): Restore $VERBOSE
-
08:41 AM Revision e31602b7 (git): Suppress warnings
-
08:40 AM Revision e6fbdde2 (git): Fix a typo [ci skip]
-
07:37 AM Feature #9456 (Closed): Include bin/racc with ruby
- I merged bin/racc at https://github.com/ruby/ruby/compare/1a2546c...754df26.
-
07:11 AM Revision 3aa8691d (git): Added and update the racc entries on doc/*.
-
07:11 AM Revision 557bcd87 (git): Added racc entry to NEWS.
-
07:11 AM Revision 5bbfca7b (git): Removed needless file with the upstream repository.
-
07:11 AM Revision 71ebf6d8 (git): Update sync task for the directory structure of cparse and ignore JRuby files.
-
07:11 AM Revision 45e939f5 (git): Added gemspec of racc generated from upstream for the default gems.
- 1.4.16.pre.1 is the teemporary version. It may be changed 1.5.0 or others.
-
07:00 AM Revision c4c47b79 (git): Disable auto indent when move cursor up or down
- This commit suppresses a strange behavior below:
if true
1[cursor]
end
and press down key
if true
1
end -
04:48 AM Feature #15940: Coerce symbols internal fstrings in UTF8 rather than ASCII to better share memory with string literals
- I think this change makes a lot of sense, not only because of the memory savings, but also because of the streamlining for encodings in general.
I agree that the chance of backwards incompatibilities in actual programs is very low. I ... - 04:44 AM Revision e4cafa39 (git): Ensure that vm_stack is cleared in `thread_cleanup_func_before_exec`.
- If `vm_stack` is left dangling in a forked process, the gc attempts to scan
it, but it is invalid and will cause a segfault. Therefore, we clear it
before forking.
In order to simplify this, `rb_ec_clear_vm_stack` was introduced. -
04:32 AM Feature #15942 (Third Party's Issue): gem: Warn on known vulnerable packages
- What @shevegen says: raise it at https://github.com/rubygems/rubygems, please.
-
04:25 AM Bug #15944 (Closed): Simultaneous line feeding and scrolling doesn't work well with irb on tmux
- See attached capture.
I just entered `1+1` repeatedly.
(`1+1` doesn't matter, whatever can cause the same behavior)
The problem is that the line of the expression `irb(main):xxx:0> 1+1` will disappear when the window scrolls.
T... - 03:30 AM Revision c26c5144 (git): Revert failed attempt at fixing invalid usage of vm_stack.
- 02:55 AM Revision 7d9d1ed4 (git): Don't clear cfp, it causes problems.
- 02:16 AM Revision 15c4f6ae (git): Skip `rb_ec_clear_vm_stack` for now.
- 01:41 AM Revision 19931099 (git): * remove trailing spaces.
- 01:41 AM Revision dbc2b89b (git): Ensure `vm_stack` is cleared after fork.
- 12:07 AM Revision 6bf1285b (git): Fix typo in VM_ASSERT.
06/19/2019
- 11:56 PM Revision 62648372 (git): Set `cfp` to null (along with vm_stack) in `rb_fiber_close`.
- 11:32 PM Revision 25049a6e (git): Extra assertions around thread.
- 11:31 PM Revision 91c4ef01 (git): Don't try to dereference NULL cfp.
-
10:35 PM Misc #15943 (Closed): Add Bug Triaging Guide
- I would like to add a bug triaging guide to the repository at `doc/bug_triaging.rdoc`, giving recommendations for triaging bugs. Alternatively, this guide could be added as a Wiki page on the bug tracker (`HowToBugTriage`). I plan to s...
-
09:46 PM Bug #15938: Error thrown undeterministically: `RegexpError: empty range in char class`
- dlee (David Lee) wrote:
> Thank you for the update. We know that Ruby 2.5+ has fixed this issue, but we were hoping the fix could be backported. Do you know if there is any workaround to reliably get Regexp to throw those errors?
You... -
08:46 PM Bug #15938: Error thrown undeterministically: `RegexpError: empty range in char class`
- Jeremy,
Thank you for the update. We know that Ruby 2.5+ has fixed this issue, but we were hoping the fix could be backported. Do you know if there is any workaround to reliably get Regexp to throw those errors?
Nobuyoshi,
Thank... -
12:10 PM Bug #15938 (Rejected): Error thrown undeterministically: `RegexpError: empty range in char class`
- `\w` cannot be an edge of range in char-class, as it is not a single char.
-
01:38 AM Bug #15938 (Closed): Error thrown undeterministically: `RegexpError: empty range in char class`
- I was able to reproduce your issue. However, Ruby 2.4 is in security maintenance phase. As this does not appear to be a security issue, we will not be backporting changes to fix it. Please see https://www.ruby-lang.org/en/downloads/bran...
-
01:30 AM Bug #15938: Error thrown undeterministically: `RegexpError: empty range in char class`
- FYI, these errors are deterministically thrown in ruby versions 2.5+, albeit with a different error message: `unmatched range specifier in char-class`.
-
01:17 AM Bug #15938 (Rejected): Error thrown undeterministically: `RegexpError: empty range in char class`
- When instantiating a Regexp, we only sometimes see `RegexpError: empty range in char class`.
To reproduce:
`100.times { Regexp.new("^([\\w'+-.%]+@[\\w-.]+\\.[A-Za-z]{2,25})(,[\\w+-.%]+@[\\w-.]+\\.[A-Za-z]{2,4}){0,4}$") }`
usually do... -
09:38 PM Bug #14563: irb in irb raises a FATAL error
- I was able to reproduce this issue with the current master branch. I'm not sure why it occurs, though. The thread that is stopped (the main thread) is woken up by the thread that `IRB.irb` spawns before that thread exits. So I am not ...
-
09:23 PM Feature #15942: gem: Warn on known vulnerable packages
- I think this may be better to raise at https://github.com/rubygems/rubygems - while some
ruby core members contribute to the code of gems, it still seems to fit better to the
github site of rubygems.
To the feature/functionality in ... -
06:44 PM Feature #15942 (Third Party's Issue): gem: Warn on known vulnerable packages
- In comparison to RubyGems, NPM offers builtin warnings when users attempt to install packages with known vulnerabilities. This helps developers to more quickly react to security concerns, updating or replacing their dependencies.
CI a... -
07:55 PM Bug #14879: Time#+ and Time#- do not preserve receiver's utc_offset if ENV['TZ'] is modified after receiver is created
- Using Ruby 2.6's new timezone support for Time, I think you can get the behavior you want, so that time calculations do not change based on `TZ`.
```ruby
ENV['TZ'] = "Pacific/Auckland"
time = Time.at(Time.parse("5pm"), in: TZInfo::T... -
07:36 PM Bug #15941: Issue with String#scrub when given block and receiver is modified in block
- Patch lgtm, thanks!
-
05:48 PM Bug #15941: Issue with String#scrub when given block and receiver is modified in block
- I can confirm this issue, and agree that handling it similarly to `String#gsub` makes sense. Attached is a patch that does that.
-
04:10 PM Bug #15941: Issue with String#scrub when given block and receiver is modified in block
- I guess the solution here would be something similar to `String#gsub`, with `str_mod_check`.
-
04:00 PM Bug #15941 (Closed): Issue with String#scrub when given block and receiver is modified in block
- This should cause a segmentation fault:
```ruby
s = "abc\u3042\xE3\x80"
loop do
s.scrub{|bytes| s << "more content"; "?" }
end
```
Not something that should happen, but I thought it might cause undesired behavior.
Thank y... -
07:31 PM Bug #14894 (Closed): Segfault loading iseqs
-
07:21 PM Bug #15432 (Closed): Float の NaN のみを含む配列比較のテスト
- Applied in changeset commit:git|a0af60c7f2d852faa6d3263874224dd7950bda43.
----------
Remove spec testing undefined behavior
Fixes [Bug #15432] -
07:20 PM Revision a0af60c7 (git): Remove spec testing undefined behavior
- Fixes [Bug #15432]
-
07:07 PM Bug #15857 (Closed): <=> の右辺が <=> を実装していない場合の振る舞い
- Applied in changeset commit:git|b9ef35e4c6325864e013ab6e45df6fe00f759a47.
----------
Implement Complex#<=>
Implement Complex#<=> so that it is usable as an argument when
calling <=> on objects of other classes (since #coerce will coerc... - 07:07 PM Revision 208cc6e3 (git): * 2019-06-20
- 07:07 PM Revision fdfe51d1 (git): * expand tabs.
-
07:04 PM Bug #14960 (Closed): Segmentation fault
-
06:58 PM Bug #15120 (Third Party's Issue): Segfault when using ActiveRecord
- This appears to be an issue in the mysql2 gem. It is similar to https://github.com/brianmario/mysql2/issues/1036#issuecomment-487389420. If it is still happening to you, you may want to update that mysql2 issue with details.
-
06:53 PM Bug #15021 (Closed): Segfault when compiling certain code on Ruby 2.5.1
-
06:46 PM Bug #14965 (Third Party's Issue): Segmentation fault at 0x0000000000000000
- This segfault occurs in a 3rd party C extension: https://github.com/ruby-gnome2/ruby-gnome2/blob/master/glib2/ext/glib2/rbgobj_type.c#L432-L453
You should probably discuss the issue in https://github.com/ruby-gnome2/ruby-gnome2/issues... -
06:00 PM Bug #15935 (Closed): Memory leak triggered by String#encode, possibly elsewhere too
-
05:50 PM Revision b9ef35e4 (git): Implement Complex#<=>
- Implement Complex#<=> so that it is usable as an argument when
calling <=> on objects of other classes (since #coerce will coerce
such numbers to Complex). If the complex number has a zero imaginary
part, and the other argument is a rea... -
05:04 PM Bug #15926: Edge case issue with String#uminus
- luke-gru (Luke Gruber) wrote:
> Hi Jeremy, thanks for the patch. I agree with the strategy of just dealing with this in `str_uminus` directly instead of fiddling around in the tricky `rb_fstring` function. However there's still an issue... -
01:33 PM Bug #15926: Edge case issue with String#uminus
- Hi Jeremy, thanks for the patch. I agree with the strategy of just dealing with this in `str_uminus` directly instead of fiddling around in the tricky `rb_fstring` function. However there's still an issue when the string is a regular Str...
-
02:07 AM Bug #15926: Edge case issue with String#uminus
- I agree that this is a bug. I'm not sure if `rb_fstring`'s behavior should be changed (hopefully a more knowledgeable committer can weigh in), so a conservative approach to fix this is to dup the receiver before passing to `rb_fstring`,...
-
03:55 PM Feature #15940: Coerce symbols internal fstrings in UTF8 rather than ASCII to better share memory with string literals
- In order to provide some data, I counted the duplicates in a Redmine heap dump (`ObjectSpace.dump_all`):
Here the counting code:
```ruby
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'json'
fstrings = []
STDIN.ea... -
03:00 PM Feature #15940 (Assigned): Coerce symbols internal fstrings in UTF8 rather than ASCII to better share memory with string literals
- Patch: https://github.com/ruby/ruby/pull/2242
It's not uncommon for symbols to have literal string counterparts, e.g.
```ruby
class User
attr_accessor :name
def as_json
{ 'name' => name }
end
end
```
Since the... -
02:24 PM Feature #15777: autoload?(cname, inherit=true)
- @nobu I edited the patch the way you suggested. Let me know if you desire further changes.
-
02:10 PM Revision 65944e96 (git): test/racc/test_racc_command.rb: Extend the timeout
- test_opal, test_ruby18, and test_ruby22 are slow tests.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-ad7f67/ruby-master/log/20190619T105405Z.fail.html.gz - 02:05 PM Revision 2abe548f (git): Don't change vm_stack/cfp without acquiring gvl first.
-
12:59 PM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- Updated patch attached
-
12:52 PM Feature #15939 (Assigned): Dump symbols reference to their fstr in ObjectSpace.dump()
- Patch: https://github.com/ruby/ruby/pull/2240
Symbols wether they are dynamic or static do hold a reference onto their respective fstring, so it's important to dump these references so that it's possible to see that a String isn't gar... -
11:40 AM Revision ab6d8d0b (git): Adjust indent
-
11:34 AM Feature #15894 (Closed): Remove support for IA64
- Okay, it was merged.
-
09:16 AM Feature #15894: Remove support for IA64
- Here is PR: https://github.com/ruby/ruby/pull/2241
-
05:51 AM Feature #15894: Remove support for IA64
- Sounds reasonable.
Matz.
- 11:33 AM Revision 659eda7f (git): * expand tabs.
- 11:30 AM Revision d17344cf (git): Remove IA64 support.
-
09:35 AM Revision 40f8c82b (git): Partly revert directory structure for cparse.
- It break the some build environment.
- 09:19 AM Revision b93508b3 (git): * remove trailing spaces, append newline at EOF.
-
09:18 AM Revision 754df262 (git): Added binstub for racc executables.
-
09:18 AM Revision 2b4024da (git): Temporary disabled to invoke assert_output_unchanged.
- Because some environment created the different results from test fixtures.
-
09:18 AM Revision e892c2f9 (git): Restore ruby/ruby change for extconf.rb.
-
09:18 AM Revision d7103218 (git): Workaround for the external file for racc test
-
09:17 AM Revision 8a3bd06d (git): use TEMP_DIR.
-
09:17 AM Revision 4cca8c4d (git): Use Test::Unit instead of Minitest and fixed test error with ruby repo.
- Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
-
09:17 AM Revision 2272d6ae (git): Restore test_dir and update prefix for Dir.mktmpdir.
-
09:17 AM Revision 9ea1fc27 (git): Try to use Dir.mktmpdir.
-
09:17 AM Revision 4e218282 (git): Added sync task for racc
-
09:17 AM Revision c110b59a (git): Fixed path for ruby core repository.
-
09:17 AM Revision 1a2546c2 (git): Backport racc-1.4.15 from upstream.
- 08:39 AM Revision cbe06cd3 (git): * remove trailing spaces, expand tabs.
- 08:39 AM Revision 3e5b885c (git): Rework debug conditional.
- 08:39 AM Revision cb5da39f (git): Use shared implementation of `rb_ec_initialize_vm_stack`.
- 08:39 AM Revision 71470380 (git): Update `stack_start` and `stack_maxsize` according to stack direction.
- 08:39 AM Revision dee0cfbb (git): Specify that size is non-committed memory.
- 08:39 AM Revision 561c9bcf (git): Make sure `alloca` fast path is used (inline assembler).
- 08:39 AM Revision 7cc7269b (git): Use default stack size for worker thread (no th pointer available).
- 08:39 AM Revision 9cb4e772 (git): Handle (empty) backtrace when thread is not born yet.
- 08:39 AM Revision 5855af73 (git): Basic assertions for thread initialization.
- 08:39 AM Revision 8121a523 (git): Use stack size defaults for win32 threads.
- 08:39 AM Revision b8e4bea7 (git): Track how stack was allocated for `cont_free`.
- 08:39 AM Revision 4b3b781c (git): Ensure execution context is cleared after thread is finished.
- 08:39 AM Revision 38791145 (git): Better handling of root fiber.
- 08:39 AM Revision 7c7a1c22 (git): Fix handling of vm_stack_size and avoid trying to deallocate it.
- 08:39 AM Revision b24603ad (git): Move vm stack init into thread.
- 08:39 AM Revision 69195fd9 (git): Show thread and fiber limits as part of bootstrap tests.
- 08:39 AM Revision 3fd83cb6 (git): Improve benchmarks and tests for threads.
- 08:39 AM Revision a6a4e860 (git): Ignore `/build*`.
-
07:15 AM Feature #15936: on_error in lieu of rescue, raise
- kylemacey (Kyle Macey) wrote:
> This is coming from a need that I personally face often on the utilities I work on, where I need to update state on an object if something unexpected happens. My company's linter gets upset when I use t... -
02:31 AM Feature #15936: on_error in lieu of rescue, raise
- kylemacey (Kyle Macey) wrote:
> What would be a thought on using another keyword that doesn't actually _rescue_ an exception, but performs an operation in the event of an error? Similar to `ensure`, but only in the event of an error.
>... -
01:56 AM Feature #15936: on_error in lieu of rescue, raise
- shevegen (Robert A. Heiler) wrote:
> Hmmm.
> ...
Yeah, this is a proposal to extend the available keywords in ruby core. So ideally, there would be release notes and documentation that would help guide people to this new feature.
> ... -
07:04 AM Bug #15160 (Closed): ArgumentError: year too big to marshal
- Applied in changeset commit:git|e690df1f1ef4f791295448f9192d6e027400ee72.
----------
Marshal distant past/future
[Feature #15160] -
06:26 AM Revision e690df1f (git): Marshal distant past/future
- [Feature #15160]
-
05:39 AM Revision 8797f483 (git): New buffer for shared string
- * string.c (rb_str_init): allocate new buffer if the string is
shared. [Bug #15937] -
01:45 AM Bug #15937: Segmentation fault when String#initialize given same string with capacity field
- I no longer get the segfault if in `rb_str_init`, `return str` is added right after existing check of `(orig == str)`, but then capacity of string won't change.
EDIT: I think I figured out what was going on. If `str` is a shared strin... -
01:37 AM Bug #15937: Segmentation fault when String#initialize given same string with capacity field
- Sorry, I forgot `puts s` in second script. I still get the segfault even in trunk with your patch, but the embedded small strings case is fixed.
Thank you. -
12:57 AM Bug #15937 (Closed): Segmentation fault when String#initialize given same string with capacity field
- Applied in changeset commit:git|28678997e40869f5591eae60edd9757334426ffb.
----------
Preserve the string content at self-copying
* string.c (rb_str_init): preserve the embedded content when
self-copying with a capacity. [Bug #15937] -
12:48 AM Bug #15937: Segmentation fault when String#initialize given same string with capacity field
- I can't reproduce the buffer corruption nor the segfault, but found the content was cleared on a short string.
Which version did you try? -
01:09 AM Revision 148f50fc (git): Update homebrew on Travis
- because Travis is crashing like "Error: Your Homebrew is outdated.
Please run `brew update`."
https://travis-ci.org/ruby/ruby/jobs/547485832 -
12:44 AM Revision 28678997 (git): Preserve the string content at self-copying
- * string.c (rb_str_init): preserve the embedded content when
self-copying with a capacity. [Bug #15937] -
12:19 AM Revision d009e321 (git): Use IRB.conf[:AUTO_INDENT] setting in multiline mode
06/18/2019
- 11:29 PM Revision c9729329 (git): * 2019-06-19
-
11:28 PM Revision 85ff2d74 (git): Avoid auto indent in prompt when dynamic auto indent
-
10:23 PM Feature #15936: on_error in lieu of rescue, raise
- Hmmm.
I have not made up my mind so I can not even say whether this may be interesting
or not.
But I think just a few general thoughts:
- People may expect begin/rescue/end, more than any alternatives. They may wonder
what on_... -
06:28 PM Feature #15936 (Open): on_error in lieu of rescue, raise
- A common bad pattern in ruby is to rescue any exception and accidentally clobber the exception.
```
begin
some_method
rescue StandardError
#
end
```
Most linters will complain if you write rescues like the code above. H... -
07:48 PM Bug #15937: Segmentation fault when String#initialize given same string with capacity field
- NOTE: I didn't attach a patch or proof of concept fix because I don't know how you want to handle this edge case. The easiest thing would just be to return the original string in `rb_str_init` and not honor the capacity change here.
-
07:41 PM Bug #15937 (Closed): Segmentation fault when String#initialize given same string with capacity field
- Reproduction steps:
string buffer corruption:
```ruby
s = "mystring"
s.__send__(:initialize, s, capacity: 1000)
puts s
```
segfault:
```ruby
s = "mystring that can't be embedded because it's too long and therefore must be ... -
03:48 PM Feature #5400: Remove flip-flops in 2.0
- rovf (Ronald Fischer) wrote:
> Do NOT remove this useful feature!!! I used it a lot already in Perl, and now using it in Ruby too. The deprecation warning also causes a lot of headache
Very much this. I find the flip-flop operator ... -
12:47 PM Feature #5400: Remove flip-flops in 2.0
- judofyr (Magnus Holm) wrote:
> Nobody knows them. Nobody uses them. Let's just get rid of flip-flops, shall we?
Do NOT remove this useful feature!!! I used it a lot already in Perl, and now using it in Ruby too. The deprecation warni... -
03:41 PM Misc #15930: DevelopersMeeting20190711Japan
- * [Feature #5400] Remove flip-flops in 2.0
* Strong objections.
-
02:08 PM Bug #15807: Range#minmax is slow and never returns for endless ranges
- I think it would make sense for `Enumerable#minmax` to just be `[min, max]`, and be overridden on some classes if useful (probably rare).
-
12:58 PM Revision 84903b31 (git): Fix auto indent crash when blank input
-
12:58 PM Revision 32e65e9e (git): Print starting debug message with RELINE_STDERR_TTY
-
12:22 PM Revision af800b8c (git): Now test-bundler is not working on macOS either
- Let's stop reporting the failure until it gets stable.
We can see the build status on console with this config anyway. -
12:20 PM Feature #15665: Cannot compile socket extension on Mojave
- @nobu Please update, or is there any reason that this should be a feature instead of a bug?
-
12:02 PM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- phluid61 (Matthew Kerwin) wrote:
>
> ...
Sorry, I wasn't clear. Yes the registry itself is in XML/CSV – that's what the `mime_types_data` gem uses to build its dataset – but it doesn't include "default charset parameter" or even detai... -
09:24 AM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- gareth (Gareth Adams) wrote:
>
> ...
The entire registry is available as [XML](https://www.iana.org/assignments/media-types/media-types.xml) and each individual registry is available as (ironically) text/csv; e.g. https://www.iana.org... -
08:13 AM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- Thanks Matthew,
I've now paid more attention to which RFCs are obsolete and which are still active.
phluid61 (Matthew Kerwin) wrote:
> > So it seems if you're making a change, it should be: ignore the protocol, and default to UTF-... -
11:58 AM Revision 235e72f1 (git): Implement auto indent for multiline
-
08:42 AM Bug #15929: Array#minmax is much slower than calling both #min and #max
- jeremyevans0 (Jeremy Evans) wrote:
> We cannot use this approach. [...]
I see, thanks for the explanation! -
08:39 AM Misc #15925: Speed up SortedSet#min, #max, #sum etc.?
- jeremyevans0 (Jeremy Evans) wrote:
> Your recommended implementation greatly improves performance.
I fear this benchmark result "over-idealizes" the performance improvements because `SortedSet#to_a` is memoized [here](https://github... -
08:31 AM Revision e6aa0a61 (git): [DOC] non-nil `$,`,`$;` will be deprecated [ci skip]
- ```
% ruby -e '$,=""; $;=""'
-e:1: warning: non-nil $, will be deprecated
-e:1: warning: non-nil $; will be deprecated
``` -
04:40 AM Revision 8b3774be (git): Fix memory leak
- * string.c (str_make_independent_expand): free independent buffer.
[Bug# 15935]
Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com> -
03:21 AM Bug #15934 (Closed): String#b can lead to memory corruption
- Applied in changeset commit:git|9dec4e8fc3a6018261834b5ac9b9877f787b97ca.
----------
String#b: Don't depend on dependent string
Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe a... - 03:21 AM Revision c770c98a (git): * expand tabs.
-
03:18 AM Revision 9dec4e8f (git): String#b: Don't depend on dependent string
- Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe and 3f95620 for details.
The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
and 2.6.3. Credits to @wanabe for usi...
06/17/2019
-
11:58 PM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- phluid61 (Matthew Kerwin) wrote:
> So it seems if you're making a change, it should be: ignore the protocol, and default to UTF-8 for `text/csv`.
Or rather: ignore the protocol; and consult the IANA registry to see what the individua... -
11:44 PM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- A lot of those quoted specs are very, very old, and in some cases obsoleted by newer specs.
HTTP/1.1 Semantics and Content [RFC7231/B](https://tools.ietf.org/html/rfc7231#appendix-B):
> The default charset of ISO-8859-1 for text me... -
08:40 PM Bug #15933 (Assigned): OpenURI: Assign default charset for HTTPS as well as HTTP
- I think this change makes sense and the patch is the simplest way to implement it.
-
07:14 PM Bug #15933 (Closed): OpenURI: Assign default charset for HTTPS as well as HTTP
- Using `open-uri` to load a document in the following circumstances:
* The `Content-Type` header is `text/*` and *doesn't* specify a charset, e.g. `Content-Type: text/csv`
* The document is loaded from an `https://` URL
…will cause... -
11:46 PM Bug #14194 (Feedback): --enable-frozen-string-literal ruby runner.rb cgi
- Now that it has been decided that Ruby 3 will not use frozen string literals by default, I think we should not assume that code that breaks with `--enable-frozen-string-literal` is buggy, just as we should not assume that code that brea...
-
11:34 PM Bug #14630 (Closed): DON'T IGNORE ME!!! Uncaught exception: SSL_connect returned=1 errno=0 state=error: certificate verify failed (error number 1)
-
11:33 PM Bug #14657 (Closed): Fix build error with LibreSSL 2.7
-
11:31 PM Bug #14810 (Feedback): Segfault during travis build (Ruby trunk 63545)
- Can you reproduce this segfault with 2.6.3 or the master branch?
-
11:25 PM Bug #14875 (Closed): /bin/sh: bad substitution
-
11:13 PM Bug #15082 (Feedback): Memory leak in net/http/response and net/http/header
- alexis (Alexis Bernard) wrote:
> I kept to investigate the memory leak issue. It seems it comes when OpenSSL::SSL::VERIFY_PEER is enabled and a ca_file is specified :
I tried with your example with 2.7.0-preview1 and it is either not... -
10:52 PM Bug #14886: ChangeLog section is obsolete
- I agree, we should fix this. The attached patch is my attempt to do so, removing ChangeLog-specific parts and keeping other parts as a guide for commit messages.
-
10:31 PM Bug #14923 (Closed): Segmentation fault when running tests
-
09:29 PM Misc #15925 (Assigned): Speed up SortedSet#min, #max, #sum etc.?
- Your recommended implementation greatly improves performance. From the benchmark in the attached patch:
```
Calculating -------------------------------------
../ruby2/run_ruby run_ruby
mi... -
09:05 PM Bug #15664 (Closed): File.executable returns incorrect results in Windows 10
- Applied in changeset commit:git|c8edf70cd20b9ff72ebd1e9402a556089f6ff204.
----------
Update documentation for File.executable{,_real}? to mention Windows issues
Fixes [Bug #15664] - 09:05 PM Revision 39a8c714 (git): * 2019-06-18
-
08:57 PM Revision c8edf70c (git): Update documentation for File.executable{,_real}? to mention Windows issues
- Fixes [Bug #15664]
-
08:04 PM Bug #15935 (Closed): Memory leak triggered by String#encode, possibly elsewhere too
- Hi, I've found a leak that can be reproduced in the following way:
```ruby
loop do
puts "running..."
50.times do
File.open("./test/rexml/data/utf16.xml", external_encoding: 'UTF-16LE', binmode: true) do |f| # mus... -
07:50 PM Bug #15934 (Closed): String#b can lead to memory corruption
- The following script triggers use-after-free on trunk(801d0d9), 2.4.6, 2.5.5
and 2.6.3.
```ruby
a = ('j' * 24).b.b
eval('', binding, a)
p a
4.times { GC.start }
p a
```
The consequence is usually that `a` gets corrupted (... -
06:48 PM Bug #15929: Array#minmax is much slower than calling both #min and #max
- janosch-x (Janosch Müller) wrote:
> possible solutions:
> ...
We cannot use this approach. `Enumerable#each` can have side effects, and you cannot iterate twice for `minmax` in the general case. Consider:
```ruby
File.open('...',... -
05:37 PM Feature #15797: Use realpath(3) instead of custom realpath implementation if available
- After discussion with some OpenBSD developers, the non-POSIX behavior of realpath(3) in OpenBSD will be removed in the future (POSIX realpath(3) requires that all components of the path exist). So I've updated the pull request (https://...
-
04:49 PM Bug #9606 (Closed): Ocassional SIGSEGV inTestException#test_machine_stackoverflow on OpenBSD
-
03:17 PM Bug #11174: threads memory leak
- The problem remains on a manually built glibc 2.28 with ruby 2.7.0dev (2019-06-17T14:25:47Z trunk 801d0d9dd7) [x86_64-linux]. So if the problem is related to glibc, the 2.28 version has no fix yet.
-
02:25 PM Revision 801d0d9d (git): Support Bison 3 in ripper
-
01:30 PM Revision c8e9e0b7 (git): Fix wrong "void value expression" error
- * parse.y (value_expr_check): `then` or `else` only `if` is not a
void value expression, as the counterpart is evaluated as `nil`.
[Bug #15932] -
12:56 PM Feature #15921: R-assign (rightward-assignment) operator
- ioquatix (Samuel Williams) wrote:
> If it's not clear, previous statement is evaluated like:
> ...
It can't be higher precedence than `.`, or it will conflict with other syntaxes too much.
Rather it should be interpreted like as:
```... -
12:47 PM Bug #15932 (Closed): wrong "void value expression" error for 'next' or 'break' statements inside an 'if' assignment
- Applied in changeset commit:git|01b3a3804334be19d013526d3edde2b84399ae43.
----------
Fix wrong "void value expression" error
* parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the w... -
09:27 AM Bug #15932 (Closed): wrong "void value expression" error for 'next' or 'break' statements inside an 'if' assignment
- When a 'next' or 'break' statement for block/loop control is placed inside an 'if' assignment, the parser outputs an error "void value expression". The same parsing error raises for the ternary operator in the same conditions.
I think... -
12:44 PM Revision 01b3a380 (git): Fix wrong "void value expression" error
- * parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the whole `if` is not
also a void value expression. [Bug #15932] - 10:56 AM Revision 09a84608 (git): * 2019-06-17
-
10:44 AM Feature #15897: `it` as a default block parameter
- Don't think that this proposal can be applied to any words. A common name is much more dangerous than a pronoun like `it` because it is much more frequently used as a method name.
Actually, the count of "def item()" is 20 times more ... -
09:03 AM Feature #15897: `it` as a default block parameter
- sawa (Tsuyoshi Sawada) wrote:
> I propose to use a new keyword `item`.
I think that is a great proposal.
`it` is nice to read when passed to methods of other objects or when used with binary operators:
```ruby
strings.each { p... -
08:38 AM Feature #15897: `it` as a default block parameter
- I propose to use a new keyword `item`.
* I feel that using a keyword spelt in letters is the right way here since keywords like `self` are used in other cases where we reach for things out of the blue without receiving them through ar... -
08:01 AM Feature #15897: `it` as a default block parameter
- Eregon (Benoit Daloze) wrote:
> shugo (Shugo Maeda) wrote:
> ...
`it` doesn't look ugly at first glance, but `it` makes the language semantics dirty as mame admitted in his proposal.
> I think readability matters a lot to many peopl... -
09:40 AM Misc #15930: DevelopersMeeting20190711Japan
- * [Feature #15903] Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
* matz: Could you decide between `Kernel.resolve_feature_path` and `$LOAD_PATH.resolve_feature_path`?
* [Feature #15897] `it` as a default block par... -
03:20 AM Misc #15930: DevelopersMeeting20190711Japan
- Carry-over tickets.
* [Feature #14912] Introduce pattern matching syntax ([pitr.ch](https://twitter.com/pitr_ch))
* Could the pattern matching be made available as a first-class citizen to be used as a filter when searching in data... -
03:20 AM Misc #15930 (Closed): DevelopersMeeting20190711Japan
- Please comment on your favorite ticket numbers you want to ask to discuss with your *SHORT* comment or summary.
(your summary/comment will help us because we don't need to read all of the ticket comments)
*DO NOT* discuss then on thi... -
07:20 AM Feature #15931 (Assigned): encoding for CESU-8
- RubyとJavaのブリッジを開発していて、文字列の変換処理で困っています。
現象)
JavaのUTF-8は非標準的な形式 (https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/types.html#modified_utf_8_strings) なので、Ruby側の文字列をそのままUTF-8にエンコードして与えると、Java側ではサロゲートペアに相当する文字を正しく認識できません。
お願... -
07:13 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- In my own custom, hand-written yaml files I tend to use e. g:
!ruby/symbol foo: bar
for symbols as keys. This would then lead to this Hash, upon
YAML.load_file:
x = YAML.load_file 'foo.yml' # => {:foo=>"bar"}
For pro... -
04:16 AM Feature #15588: String#each_chunk and #chunks
- Is size in characters or bytes?
-
04:13 AM Feature #15588: String#each_chunk and #chunks
- I wonder if we should have consistency with `slice` and `each_slice` from `Array`. But honestly, I don't care, just if it's available.
-
04:11 AM Feature #15588: String#each_chunk and #chunks
- Here is a usecase
https://github.com/socketry/protocol-http2/blob/12875a97e0f82315682191e3bbbaba8b59cb3432/lib/protocol/http2/settings_frame.rb#L236
Because I didn't know `/....../` should be `/....../m` I wasted at least 2 hours o... -
03:15 AM Misc #15874 (Closed): DevelopersMeeting20190613Japan
06/16/2019
-
08:11 PM Bug #15929 (Closed): Array#minmax is much slower than calling both #min and #max
- this is similar to [issue 15807 about Ranges](https://bugs.ruby-lang.org/issues/15807) and maybe also to [13917](https://bugs.ruby-lang.org/issues/13917)
current situation:
- calling `Array#minmax` incurs a performance penalty of a... -
06:09 PM Revision a064e467 (git): Support Bison 3
-
03:29 PM Feature #15799: pipeline operator
- Seeing `|>` my assumption would be that you could use it in the functional style, so you could do:
``` ruby
42 |> Integer(exception: false) |> Math.sqrt
```
Instead of:
```ruby
Math.sqrt(Integer(42, exception: false))
```
S... -
08:11 AM Feature #15799: pipeline operator
- The operator doesn't bother me, though I can't think of any time I'd use it.
Several suggested alternatives seem to want to leave the syntax ambiguous, leaving it unclear whether the piped thing is the receiver or the arg and its uncl... -
12:49 AM Feature #15799: pipeline operator
- At first, I wasn't so sure about how to use such an operator, and honestly, the ASCII symbol `|>` is a bit jarring, but using a font with ligatures you get a better idea of how it's supposed to look, and it does look really great.
I h... -
12:17 AM Feature #15799: pipeline operator
- I investigated history of pipeline operator. It is very long, so I wrote [an article in my blog](https://mamememo.blogspot.com/2019/06/a-brief-history-of-pipeline-operator.html). In short: In my current opinion, the current spec is som...
-
02:52 PM Bug #15916 (Closed): Memory leak in Regexp literal interpolation
- Applied in changeset commit:git|53e9908d8afc7f03109b0aafd1698ab35f512b05.
----------
Fix memory leak
* string.c (str_replace_shared_without_enc): free previous buffer
before replaced.
* parse.y (gettable): make sure in advance that ... -
12:15 AM Bug #15916: Memory leak in Regexp literal interpolation
- I managed to track down the leak, and it's related to rb_fstring().
reg_set_source() calls rb_fstring() with the tainted string, and there's a leak when non-"bare" (ivars or tainted) non-embedded strings are
given to rb_fstring().
... -
02:51 PM Revision 53e9908d (git): Fix memory leak
- * string.c (str_replace_shared_without_enc): free previous buffer
before replaced.
* parse.y (gettable): make sure in advance that the `__FILE__`
object shares a fstring, to get rid of replacement with the
fstring later.
TODO: t... -
02:37 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
- IMO, for `expr::C = lhs`, it should first evaluate `expr` and then do `lhs` because `expr` is left to `lhs`. But I'm unsure whether it should raise a TypeError when `expr` is not a Module. My personal expectation is that `lhs` is evalu...
-
02:30 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
- There are specs that cover this, so at least it is how Ruby implementors understand that it is intended to be, and it's been this way for a decade or more.
https://github.com/ruby/spec/blob/ff678eb339f16fc5424b25f2e2c82c59c14583be/lan... -
02:28 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
- s/lhs/rhs/
-
02:25 PM Bug #15928 (Closed): Constant declaration does not conform to JIS 3017:2013
- The order of evaluation in constant declaration does not conform to JIS 3017:2013 11.4.2.2.3.
# Problem
Suppose that we are evaluating the following program.
```ruby
expr::C = rhs
```
The standard seems to be requiring the ... - 02:01 PM Revision d4929f51 (git): * expand tabs.
-
02:00 PM Revision 1ff26dc4 (git): Revert "Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3"
- This reverts commit 44caca11cfa6bea01a1ef738846183f1a56d5658.
The change caused a build failure.
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2102153 - 01:48 PM Revision 11f8c891 (git): * expand tabs.
-
01:48 PM Bug #15924: Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- @nobu
Thanks. Actually, YARD doesn't use the Lexer, but I switched to using it a long time ago, and all the repos shown at https://msp-greg.github.io/ are created using it. Conversely, Lexer is subclassed from Ripper. So what's usi... -
10:18 AM Bug #15924: Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- It is an example of syntax error, cannot be fallen back?
YARD itself just warns it but succeeds.
```
$ echo $'<<\"EOS\n\"\nEOS' > yardtest.rb
$ ~/.gem/ruby/2.7.0/bin/yard doc yardtest.rb
[warn]: Syntax error in `yardtest.rb`:(1... -
01:43 PM Revision 44caca11 (git): Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3
- compile.c (NODE_CDECL): Evaluate the module before the value
test/ruby/test_const.rb (test_evaluation_order): added a test case -
01:27 PM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- Whether it's YAML or another data format like JSON, I've found it useful on occasion to treat `sprintf()` like a mini templating from a runtime generated Hash like ashmaroli mentioned. Sometimes ERB seems like overkill in quick scripts o...
-
11:41 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- ashmaroli (Ashwin Maroli) wrote:
> One use-case would be where the Data used by `sprintf` is generated at runtime:
> ...
I do not think that is the duty of string format.
If the YAML file is written by a Ruby program, then you shoul... -
06:46 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- > Can you give us some actual use case(s) where such rewriting would not be possible, or very tedious?
One use-case would be where the Data used by `sprintf` is generated at runtime:
```ruby
require 'yaml'
# contents of 'path/to/... -
03:04 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- I agree with @sawa that there's a difference between gsub (where strings are replaced by strings) and sprintf, where it's interpolating something very close to variables.
A use case such as
```
"foo = %{foo}" % { 'foo' => 'bar' }
`... -
01:26 PM Bug #15807: Range#minmax is slow and never returns for endless ranges
- Thinking about this a bit more generally, I'm wondering whether `Enumerable#minmax` should actually use `rb_funcall` to get `min` and `max`.
This would fix the problem described in this issue.
But perhaps more importantly, it elimi... -
01:11 PM Feature #15923: New independent string without memcpy
- Thank you Nobu, I thought that might be the case but was unaware as I'm not familiar with the GC subsystem. Also I think shyouhei was saying the same thing, I was just too dense to understand the specifics of what he was saying :)
Hav... -
06:32 AM Feature #15923: New independent string without memcpy
- `ruby_xfree` != `free`.
Using the former on malloc'ed buffer can cause a crash. -
10:45 AM Feature #15920: Check frozen state of ENV
- jeremyevans0 (Jeremy Evans) wrote:
> Eregon (Benoit Daloze) wrote:
> ...
I would call that entirely unsupported, and if there are ways to detect this, we should probably raise an exception.
Basically, I believe it's undefined behavior... -
10:35 AM Feature #15920: Check frozen state of ENV
- jeremyevans0 (Jeremy Evans) wrote:
> * Disallow modifying `ENV` after `ENV.freeze` (my original patch).
I don't object this behavior itself, just don't consider the current behavior a bug, that is I don't think this should be backpor... -
05:46 AM Revision 2fb1564c (git): Implement line_no correctly
-
03:21 AM Bug #15801: [BACKPORT] ChangeLogs of 2.5 and 2.6 begin before the 2.4 release
- ruby_2_6 r67711 merged revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637,6f8ac2cb28f99a4b2588c59ec44eff6ed38c4d3b.
-
03:20 AM Revision accd7f69 (git): merge revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637,6f8ac2cb28f99a4b2588c59ec44eff6ed38c4d3b: [Backport #15801]
- Updated marked commits for ChangeLog
Include the beginning commit in ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:59 AM Revision 17e6536f (git): tool/redmine-backporter.rb: Change redmine git revisions URL path.
- 02:46 AM Revision 72cc5cf0 (git): * 2019-06-16
-
02:39 AM Revision ee7999bb (git): tool/redmine-backporter.rb: Add parens to fix condition for svn revision search.
-
12:55 AM Feature #15921: R-assign (rightward-assignment) operator
- If it's not clear, previous statement is evaluated like:
```ruby
(Users.where(active: true) => active_users).where(type: "admin") => admin_users
``` -
12:55 AM Feature #15921: R-assign (rightward-assignment) operator
- There are two areas where I think this is a great addition:
```ruby
x = if foo
bar
else
baz
end
if foo
bar
else
baz
end => x
```
I prefer the latter, because it avoids messing with the indentation/readability of th...
06/15/2019
-
06:08 PM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- > My argument for this feature is that String#gsub() and family works with string keys if given a Hash
That is because they replace substrings, in which case it rather does not make sense to express them as symbols. The argument cann... -
02:28 PM Feature #15927 (Closed): Allow string keys to be used for String#% and sprintf methods
- Right now, in the methods sprintf() and String#%, only symbol keys can be used for named interpolation. For example (from the example documentation):
"foo = %{foo}" % { :foo => 'bar' } #=> "foo = bar"
String keys do not work... -
05:31 PM Feature #15920: Check frozen state of ENV
- Eregon (Benoit Daloze) wrote:
> One potential concern here is that even if `ENV` is frozen, C extensions, or native libraries linked by C extensions, might still call e.g., `setenv()` and effectively modify values returned by `ENV` (and... -
05:01 PM Feature #15920: Check frozen state of ENV
- One potential concern here is that even if `ENV` is frozen, C extensions, or native libraries linked by C extensions, might still call e.g., `setenv()` and effectively modify values returned by `ENV` (and even add new environment variabl...
-
12:07 AM Feature #15920: Check frozen state of ENV
- nobu (Nobuyoshi Nakada) wrote:
> I don't think this behavior a bug.
> ...
I think the current situation of `ENV.freeze` not raising an exception but still allowing mutation is a bug. We have two ways to fix it:
* Disallow modifying... -
03:58 PM Bug #15924: Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- Found the issue, below is a repo, which in MinGW master, generates RuntimeError...
```ruby
require 'ripper'
temp = "<<\"EOS\n\" # This has been warned since 2.4\nEOS"
puts '', temp, ''
lexer = Ripper::Lexer.new temp
lexer.l... -
04:54 AM Bug #15924 (Closed): Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- YARD based docs systems use Ripper for highlighting both source code and 'code snippets' in comments and rdoc/md files.
Using the build shown, I have an error as shown:
```
lib/ruby/2.7.0/ripper/lexer.rb:101:in `lex'
lib/ruby/2.7... -
01:42 PM Feature #15923: New independent string without memcpy
- I think what puchuu is asking is if he can pass a malloc'd string to a ruby function that will create a new string object that frees the given underlying buffer when the string object is destructed. Having read the code, I didn't come up...
-
01:19 PM Bug #15926 (Closed): Edge case issue with String#uminus
- I was working on issue related to code in `rb_fstring`(https://github.com/ruby/ruby/pull/2233) and saw some weird behavior in the function,
freezing the given string if it's not a "bare" string and it's small enough to be embedded.
T... -
11:10 AM Misc #15925 (Closed): Speed up SortedSet#min, #max, #sum etc.?
- this issue is somewhat similar to https://bugs.ruby-lang.org/issues/15807
current situation, using the example of `SortedSet#min` (without `rbtree`):
- `SortedSet#min` calls `Enumerable#min`
- `Enumerable#min` calls `SortedSet#eac... -
10:38 AM Feature #15897: `it` as a default block parameter
- Kotlin has implemented `it` like this ([docs](https://kotlinlang.org/docs/reference/lambdas.html#it-implicit-name-of-a-single-parameter)).
From purely personal experience, after doing just a little bit of Kotlin, I often feel a tempta... -
09:50 AM Bug #15807: Range#minmax is slow and never returns for endless ranges
- jeremyevans0 (Jeremy Evans) wrote:
> I think this is a bug we should fix, even if it breaks code relying on this bug ("all bug fixes are incompatibilities" :)).
Yes, it is a bit reminiscent of https://xkcd.com/1172/ :)
> ...
Other... -
03:04 AM Revision 5d790549 (git): Revert github/pull/2230, commit miss
-
02:58 AM Revision 6fa4c904 (git): Prefer `enum yytokentype` to int
-
02:25 AM Revision 46527e1b (git): Test for blank lines between leadinig dot method chains
-
02:25 AM Revision b8730f12 (git): Multiline method chain with leading dot works for blank lines
-
02:25 AM Revision 2240de98 (git): Remove blank line I accidentally added
-
02:25 AM Revision 162bfa1c (git): Test comments between multiline method chain
-
02:25 AM Revision cc180e93 (git): Rename LINEND to EMPTYLN
-
02:25 AM Revision 5af5dd46 (git): Omg, it works!
- I'll rename it and squash this commit later,
just wanted to make sure I couldn't lose it
(took a long time to come up with). - 02:09 AM Revision e6aefe2a (git): * 2019-06-15
-
02:06 AM Revision 5dd8fdd3 (git): test/net/imap/test_imap.rb: wait for the server thread to start
- In some slow CI environments, the invocation of a thread seems very
slow. This causes a test failure to attempt to connect a server that
does not start yet.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20... -
01:53 AM Bug #15763: Segmentation fault in timeout.rb / sleep
- A valid workaround until this is fixed in MacOS - if you can get away without ipv6 - is to have your web server like Puma bind to an ipv4 address like `-b 127.0.0.1` or `-b 0.0.0.0` upon boot and then all is :rainbows:.
-
01:00 AM Feature #15919: Offset parameter for `Integer#times`
- I agree with all the commenters that using keyword arguments is crucial (and I prefer `start_at:` (or maybe just `start:`) to `offset:`). I also agree that `Integer#step` seems already good enough. Maybe we could add a line about `Intege...
-
12:56 AM Bug #15199: scanf.rb broken with io from IO.pipe (MinGW or Windows?)
- I've tested on Windows and confirmed this is a bug.
I added a pull request upstream to fix this: https://github.com/ruby/scanf/pull/4
If nobody has objections, I'll merge this in about a week. -
12:18 AM Bug #15200 (Closed): RubyVM::InstructionSequence can not compile to binary from method call with hash in 'if false' expression
-
12:18 AM Bug #15221 (Closed): Segfault in Ruby VM
-
12:15 AM Bug #15246 (Closed): Invalid read (SEGV on indeterminate address) in id_table.c
-
12:11 AM Bug #15308 (Closed): SegFault in GC under Ruby 2.5.3 on OS X
06/14/2019
-
11:59 PM Feature #15923: New independent string without memcpy
- puchuu (Andrew Aladjev) wrote:
> Is it possible to create independent string from source string without memcpy that will be freed automatically?
In C there are several ways to free a memory region, depending how that string was alloc... -
01:51 PM Feature #15923 (Rejected): New independent string without memcpy
- Hello. I've just tried to implement extension for ruby that will provide large binary strings.
I've inspected latest ruby source code and found 2 functions: _rb_str_new_ and _rb_str_new_static_ .
* _rb_str_new_ allocates new memory... -
11:12 PM Feature #15799: pipeline operator
- Matz:
Ruby being a "Lisp-2" means that the pipeline operator couldn't be implemented like a "normal" operator (all of them being translated to methods on Object or etc), but it could be implemented on the parser level, like almost all... -
07:30 PM Feature #15799: pipeline operator
- rogeriochaves (Rogerio Chaves) wrote:
> May I give yet another suggestion? What about :., it would keep the visual effect
> ...
Or \\ maybe. It's much easier to type.
1 + 1 \\ to_s 2 \\ reverse \\ to_i
We can then have |> as an a... -
04:56 PM Feature #15799: pipeline operator
- @cichol Agreed! Here is a working proof of concept for an "operator-less" pipe operator which feels more natural in Ruby: https://github.com/lendinghome/pipe_operator
```ruby
# before
JSON.parse(Net::HTTP.get(URI.parse(url)))
# a... -
01:15 PM Feature #15799: pipeline operator
- Hi,
I want to introduce a way to pipeline method calls in Ruby.
I imagined that the Ruby-styled pipelined calls should be like:
```ruby
1.pipe do
call 1 + _ # => after this line, _ becomes 2
call _ * 3 # => after this line,... -
11:03 AM Feature #15799: pipeline operator
May I give yet another suggestion? What about :., it would keep the visual effect
```ruby
1 + 1
:. to_s 2
:. reverse
:. to_i
```-
10:30 AM Feature #15799: pipeline operator
- From my perspective, the |> operator exists because in functional programming languages you have these increasingly nested function calls which have to end with a stack of parentheses that are hard to read. In Haskell I very frequently u...
-
08:27 AM Feature #15799: pipeline operator
- I wonder if it would be possible to get method objects somehow. `.:` was capable of doing this off of objects, but doing it in the main namespace is not easy.
If pipeline operators in an Elixir style were considered, it may be able to... -
07:45 AM Feature #15799: pipeline operator
- Unlike JavaScript and Python (Lisp-1 like languages), Ruby is a Lisp-2 like language, in which methods and variable have separated namespaces. In Lisp-1 like languages, `f1 = function; f1()` calls `function` (single namespace).
In a L... -
06:15 AM Feature #15799: pipeline operator
- That's a very fair point @jeremyevans0, it would introduce two lookup chains even under the most ideal of circumstances. Perhaps if `&` were slightly extended, one could do this:
```ruby
def double(n) n * 2 end
increment = -> n { ... -
05:42 AM Feature #15799: pipeline operator
- I think one big issue here is simply the choice of symbols for this thing. If it were any other symbols, I suspect a lot of people would not have reacted so emotionally.
To most Rubyists who know it, `|>` has a distinctive meaning. It... -
03:18 AM Feature #15799: pipeline operator
- baweaver (Brandon Weaver) wrote:
> But in summary, I believe this feature could be substantially more expressive and powerful if it adjusted its lookup chain from directly calling on an object to searching the local scope for procs and... -
03:00 AM Feature #15799: pipeline operator
- @inopinatus We are working on the right side assignment operator. Combine pipelines with it.
Matz.
-
02:51 AM Feature #15799: pipeline operator
- I have written on my opinions here: https://dev.to/baweaver/ruby-2-7-the-pipeline-operator-1b2d
But in summary, I believe this feature could be substantially more expressive and powerful if it adjusted its lookup chain from directly ... -
02:01 AM Feature #15799: pipeline operator
- Please consider adjusting the precedence of the pipeline operator to be above that of assignment. I was surprised by this outcome:
``` ruby
result = 3 |> pow(2) #=> 9
result #=> 3 (!?!?!)
```
-
12:12 AM Feature #15799: pipeline operator
- Responses to this change:
- Twitter: https://twitter.com/a_matsuda/status/1139110957450375168
- Reddit: https://www.reddit.com/r/ruby/comments/c059d2/pipeline_operator_in_ruby/
- Github (mentioned above): https://github.com/ruby/rub... -
09:45 PM Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
- Thanks for discussing the issue at the meeting.
I think having singleton-only methods on `Kernel` would be OK, and probably most of us agree having the instance method is not warranted for a rarely-used method.
`Kernel` makes sense t... -
02:51 AM Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
- This ticket was discussed at yesterday dev meeting. Currently there is no singleton method to `Kernel`, so some people were reluctant. Nobu counterproposed `$LOAD_PATH` as above, and matz said he waits for eregon's response to the coun...
-
09:28 PM Feature #15897: `it` as a default block parameter
- shugo (Shugo Maeda) wrote:
> > I think we should never purposefully introduce something ugly in the language.
> ...
That's not what I meant. I'd rather not have something ugly in the language at all.
But I think we can make it not ugl... -
02:54 AM Feature #15897: `it` as a default block parameter
- Eregon (Benoit Daloze) wrote:
> shugo (Shugo Maeda) wrote:
> ...
So let's reject both proposals.
> Preventing overuse is I think best done by limiting to a single argument (as argued in #15723).
I guess `it` will be overused when... -
08:58 PM Bug #13220: Enhance support of Unicode strings manipulation
- Most of these test failures are caused by Ruby operating on code points, not grapheme clusters. There are more and more characters that are only expressed by several code points, and they are not limited to obscure cases, such as "q̈". F...
-
02:53 PM Feature #15899: String#before and String#after
- sawa is right. Just use `partition` and `rpartition`.
-
07:30 AM Feature #15899: String#before and String#after
- How about `first` and `last`?
```ruby
'hello world'.first(2)
=> 'he'
'hello world'.last(2)
=> 'ld'
'hello world'.first
=> 'h'
'hello world'.last
=> 'd'
'hello world'.first(1, ' ')
=> 'hello'
'hello world'.last(1, ' ')
... -
12:27 PM Feature #15921: R-assign (rightward-assignment) operator
- This has lower precedence, so the latter.
-
10:49 AM Feature #15921: R-assign (rightward-assignment) operator
- where does the rightward assign works and where it is blocked? `y => x` might be treated as Hash Parameter
like `m y => x` is this `m(y) => x` or still `m({y => x})` -
03:08 AM Feature #15921 (Closed): R-assign (rightward-assignment) operator
- From https://bugs.ruby-lang.org/issues/15799#change-78465, proposal of the rightward-assignment operator by `=>`.
```
$ ./ruby -v -e '(1..).lazy.map {|x| x*2} => x' -e 'p x.first(10)'
ruby 2.7.0dev (2019-06-12T06:32:32Z feature/rass... -
12:25 PM Feature #15920: Check frozen state of ENV
- I don't think this behavior a bug.
`ENV` is an interface to the system environment variables, so freezing it doesn't affect the underlying system.
And be careful that an object can never be unfrozen anymore, once it got frozen.
For w... -
06:35 AM Feature #15920: Check frozen state of ENV
- Agree - looks like a bug to me as well.
-
02:27 AM Feature #15920: Check frozen state of ENV
- I didn't know `assert_separately`, thank you!
-
12:16 PM Feature #14912: Introduce pattern matching syntax
- I've intentionally focused on use-cases because: I wanted to make clear why Ruby should to support this; and I've included a possible solution only to make it more clear, since I think Kazuki or somebody else who also spend significant t...
-
09:17 AM Revision d365fd5a (git): An operator is not allowed just after `|>`
- https://twitter.com/yukihiro_matz/status/1139454774640726019
-
08:30 AM Revision d780c366 (git): Pipeline operator is experimental [ci skip]
-
06:31 AM Revision aa32465a (git): irb.rb: [DOC] the default prompt includes :PROMPT_N [ci skip]
-
03:40 AM Feature #15922 (Open): Enumerable#partition(pattern)
- * `any?` `all?` `one?` `none?` already can take pattern argument. ref: https://bugs.ruby-lang.org/issues/11286
* `select` `reject` is proposed to take pattern argument. ref: https://bugs.ruby-lang.org/issues/14197
I would like to use... -
01:02 AM Bug #15857: <=> の右辺が <=> を実装していない場合の振る舞い
- > > @jeremyevans0 Thank you for your comment. About Complex, I agree with most of v2 patch, but I have some comments.
> ...
I don't have a strong opinion, too.
> > About other than Complex, <=> of some classes, such as String and Tim...