ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

September 2024

  • 5 participants
  • 211 discussions
[ruby-core:119160] [Ruby master Bug#20734] Build failure at FreeBSD 14.1
by hsbt (Hiroshi SHIBATA) 19 Sep '24

19 Sep '24
Issue #20734 has been reported by hsbt (Hiroshi SHIBATA). ---------------------------------------- Bug #20734: Build failure at FreeBSD 14.1 https://bugs.ruby-lang.org/issues/20734 * Author: hsbt (Hiroshi SHIBATA) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- FreeBSD 14.1 build is also failure with ruby master. This is different error from #20733 ``` [hsbt@freebsd ~/ruby]$ make BASERUBY = /usr/local/bin/ruby --disable=gems CC = clang LD = ld LDSHARED = clang -shared CFLAGS = -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef XCFLAGS = -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/amd64-freebsd14.1 -I./include -I. -I./prism -I./enc/unicode/15.0.0 CPPFLAGS = DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,showflags -fstack-protector-strong -pie SOLIBS = -lexecinfo -lprocstat -lz -lrt -lrt -ldl -lcrypt -lm -lthr LANG = C.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/home/hsbt/ruby/yjit/target/release/' ./yjit/src/lib.rs FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9) Target: x86_64-unknown-freebsd14.1 Thread model: posix InstalledDir: /usr/bin compiling version.c In file included from version.c:14: ./version.h:29:5: error: invalid suffix 'RUBY_RELEASE_MONTH' on integer constant 29 | #if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH) | ^ ./version.h:25:27: note: expanded from macro 'ONLY_ONE_DIGIT' 25 | #define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000 | ^ ./include/ruby/internal/config.h:37:26: note: expanded from macro 'TOKEN_PASTE' 37 | #define TOKEN_PASTE(x,y) x##y | ^ <scratch space>:156:3: note: expanded from here 156 | 10RUBY_RELEASE_MONTH | ^ In file included from version.c:14: ./version.h:34:5: error: invalid suffix 'RUBY_RELEASE_DAY' on integer constant 34 | #if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY) | ^ ./version.h:25:27: note: expanded from macro 'ONLY_ONE_DIGIT' 25 | #define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000 | ^ ./include/ruby/internal/config.h:37:26: note: expanded from macro 'TOKEN_PASTE' 37 | #define TOKEN_PASTE(x,y) x##y | ^ <scratch space>:157:3: note: expanded from here 157 | 10RUBY_RELEASE_DAY | ^ 2 errors generated. *** Error code 1 Stop. make: stopped in /home/hsbt/ruby ``` -- https://bugs.ruby-lang.org/
1 3
0 0
[ruby-core:119262] [Ruby master Feature#20756] Introduce Boolean class
by kbrock (Keenan Brock) 19 Sep '24

19 Sep '24
Issue #20756 has been reported by kbrock (Keenan Brock). ---------------------------------------- Feature #20756: Introduce Boolean class https://bugs.ruby-lang.org/issues/20756 * Author: kbrock (Keenan Brock) * Status: Open ---------------------------------------- Hello All, Is is possible to add a parent class for `TrueClass` and `FalseClass`? I always found it strange that there was not a concept to group `true` and `false` together. e.g.: ```ruby class TrueClass < Boolean ; end class FalseClass < Boolean ; end # replaces the hack: module Boolean ; end TrueClass.include(Boolean); FalseClass.include(Boolean); ``` In our code, we often want to validate that a value is of a certain type. ```ruby case(value) when String ... when Integer ... when true, false ... # Boolean # alt: when TrueClass, FalseClass end # or def valid_args? value.kind_of?(String) end def valid_args? value.kind_of?(Integer) end def valid_args? [true, false].include?(value) [TrueClass, FalseClass].detect { |klass| value.kind_of?(klass) } end ``` Does it make sense to others to have a way to group `true` and `false` together? Thank you for your thoughts, Keenan -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:119251] [Ruby master Bug#20754] [doc] `Hash::new` is missing from rdoc for 3.4
by Earlopain (A S) 18 Sep '24

18 Sep '24
Issue #20754 has been reported by Earlopain (A S). ---------------------------------------- Bug #20754: [doc] `Hash::new` is missing from rdoc for 3.4 https://bugs.ruby-lang.org/issues/20754 * Author: Earlopain (A S) * Status: Open * ruby -v: 3.4-dev * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I was interested in the `capacity` argument added in https://github.com/ruby/ruby/pull/10357 but found any reference to it missing from https://docs.ruby-lang.org/en/master/Hash.html `::new` just links to docs from `BasicObject`. Docs for 3.3 contain the proper `new` method: https://docs.ruby-lang.org/en/3.3/Hash.html#method-c-new Maybe it has something to do with it moving into ruby code? Not sure. I haven't checked other classes that moved into ruby. -- https://bugs.ruby-lang.org/
1 1
0 0
[ruby-core:119242] [Ruby master Bug#20751] Regression in Prism related to use of super in default argument values
by jeremyevans0 (Jeremy Evans) 17 Sep '24

17 Sep '24
Issue #20751 has been reported by jeremyevans0 (Jeremy Evans). ---------------------------------------- Bug #20751: Regression in Prism related to use of super in default argument values https://bugs.ruby-lang.org/issues/20751 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED ---------------------------------------- All versions of parse.y dating at least back to Ruby 1.8.7, and Prism in both Ruby 3.3.5 and 3.4.0preview1, correctly parses this code: ```ruby class A def foo(b = nil || (return)) end end ``` The master branch, unless `--parser=parse.y` is used, now considers this a SyntaxError: ``` -: -:2: syntax error found (SyntaxError) 1 | class A > 2 | def foo(b = nil || (return)) | ^~~~~~ Invalid return in class/module body 3 | end 4 | end ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:119199] [Ruby master Bug#20742] Trying to assign to a variable in statement modifier should emit a warning
by esad (Esad Hajdarevic) 17 Sep '24

17 Sep '24
Issue #20742 has been reported by esad (Esad Hajdarevic). ---------------------------------------- Bug #20742: Trying to assign to a variable in statement modifier should emit a warning https://bugs.ruby-lang.org/issues/20742 * Author: esad (Esad Hajdarevic) * Status: Open * ruby -v: 3.3.4 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- There is an example in Control Expressions documentation: ``` p a if a = 0.zero? # raises NameError “undefined local variable or method ‘a’”. ``` However, if we had already defined `a` there would be no exception raised. If one uses something like `p` for scratch variable, due to Kernel#p, also no exception is raised. Statement modifier is generally somewhat inverting the code flow (the right part is evaluated first then the left part), so it is not really obvious why binding variables shouldn't follow the same flow. A warning would be very beneficial. -- https://bugs.ruby-lang.org/
4 6
0 0
[ruby-core:119220] [Ruby master Bug#20749] Error message not shown in output with prism
by luke-gru (Luke Gruber) 17 Sep '24

17 Sep '24
Issue #20749 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #20749: Error message not shown in output with prism https://bugs.ruby-lang.org/issues/20749 * Author: luke-gru (Luke Gruber) * Status: Open * ruby -v: 3.4.0dev * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- test.rb: ```ruby p = Proc.new ``` ``` ./ruby --parser=parse.y -I../ruby/lib -I. -I.ext/x86_64-linux -I.ext/common -r./x86_64-linux-fake ../ruby/test.rb ../ruby/test.rb:1:in 'Proc.new': tried to create Proc object without a block (ArgumentError) from ../ruby/test.rb:1:in '<main>' ``` ``` ./ruby --parser=prism -I../ruby/lib -I. -I.ext/x86_64-linux -I.ext/common -r./x86_64-linux-fake ../ruby/test.rb ../ruby/test.rb:1:in 'Proc.new': ArgumentError from ../ruby/test.rb:1:in '<main>' ``` -- https://bugs.ruby-lang.org/
1 1
0 0
[ruby-core:119214] [Ruby master Bug#20747] [prism] regression in retry precedence
by byroot (Jean Boussier) 16 Sep '24

16 Sep '24
Issue #20747 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #20747: [prism] regression in retry precedence https://bugs.ruby-lang.org/issues/20747 * Author: byroot (Jean Boussier) * Status: Open * Assignee: kddnewton (Kevin Newton) * ruby -v: ruby 3.4.0dev (2024-09-15T01:06:11Z master 532af89e3b) +PRISM [arm64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Since prism has been made the default, our test suite now fail to boot with the following error: ```ruby syntax error found (SyntaxError) 298 | raise e 299 | else > 300 | retry | ^~~~~ Invalid retry after else 301 | end 302 | end ``` Here's the code in question, that reproduce the error: ```ruby def retry_thing(times: 1) retries ||= 0 begin yield rescue RuntimeError => e raise if (retries += 1) > times begin refresh! rescue raise e else retry end end end ``` -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:119207] [Ruby master Bug#20744] syntax error found (SyntaxError) `UTF-8 mixed within US-ASCII source` reported Ruby with Prism parser
by yahonda (Yasuo Honda) 16 Sep '24

16 Sep '24
Issue #20744 has been reported by yahonda (Yasuo Honda). ---------------------------------------- Bug #20744: syntax error found (SyntaxError) `UTF-8 mixed within US-ASCII source` reported Ruby with Prism parser https://bugs.ruby-lang.org/issues/20744 * Author: yahonda (Yasuo Honda) * Status: Open * ruby -v: ruby 3.4.0dev (2024-09-15T01:06:11Z master 532af89e3b) +PRISM [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I'm reporting this issue based on Rails Nightly CI against Ruby 3.4.0dev. https://buildkite.com/rails/rails-nightly/builds/1023#0191ed31-1d77-4705-ab… I have not able to create a minimum test case without Rails yet. ### Steps to reproduce ```ruby git clone https://github.com/rails/rails cd rails/actionview bin/test test/template/template_test.rb:278 ``` ### Expected behavior It should pass as it Runs parser.y parser ```ruby $ RUBYOPT=--parser=parse.y bin/test test/template/template_test.rb:278 /home/yahonda/.gem/ruby/3.4.0+0/gems/json-2.7.1/lib/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0. You can add ostruct to your Gemfile or gemspec to silence this warning. Running 36 tests in a single process (parallelization threshold is 50) Run options: --seed 61197 # Running: . Finished in 0.037914s, 26.3756 runs/s, 79.1267 assertions/s. 1 runs, 3 assertions, 0 failures, 0 errors, 0 skips $ ``` ### Actual behavior It raises the following `syntax error found (SyntaxError)` ```ruby $ bin/test test/template/template_test.rb:278 /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:79:in 'Kernel.require': /home/yahonda/src/github.com/rails/rails/actionview/test/template/template_test.rb:278: syntax error found (SyntaxError) 276 | @template = new_template("<%# encoding: ISO-8859-1 %>\n<%# locals: (message: 'Hi!') %>\nhello \xFCmlat\n<%= message %>", virtual_path: nil) 277 | assert_equal Encoding::UTF_8, render.encoding > 278 | assert_match(/hello \u{fc}mlat\nHi!/, render) | ^~ UTF-8 mixed within US-ASCII source 279 | end 280 | end from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:79:in 'block (2 levels) in Kernel#replace_require' from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:62:in 'block in Rails::TestUnit::Runner.load_tests' from <internal:array>:42:in 'Array#each' from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:60:in 'Rails::TestUnit::Runner.load_tests' from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:52:in 'Rails::TestUnit::Runner.run' from /home/yahonda/src/github.com/rails/rails/tools/test.rb:18:in '<top (required)>' from bin/test:5:in 'Kernel#require_relative' from bin/test:5:in '<main>' $ ``` -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:119219] [Ruby master Bug#20748] Issue with defined? given method call with block in prism compiler
by luke-gru (Luke Gruber) 16 Sep '24

16 Sep '24
Issue #20748 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #20748: Issue with defined? given method call with block in prism compiler https://bugs.ruby-lang.org/issues/20748 * Author: luke-gru (Luke Gruber) * Status: Open * ruby -v: 3.4.0dev * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- test.rb ```ruby puts defined?(undefined_method(){}) ``` ``` ./ruby --parser=parse.y -I../ruby/lib -I. -I.ext/x86_64-linux -I.ext/common -r./x86_64-linux-fake ../ruby/test.rb expression ``` ``` ./ruby --parser=prism -I../ruby/lib -I. -I.ext/x86_64-linux -I.ext/common -r./x86_64-linux-fake ../ruby/test.rb # empty line ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:119194] [Ruby master Bug#20741] RubyVM::InstructionSequence.compile emits a wrong warning (prism?)
by mame (Yusuke Endoh) 16 Sep '24

16 Sep '24
Issue #20741 has been reported by mame (Yusuke Endoh). ---------------------------------------- Bug #20741: RubyVM::InstructionSequence.compile emits a wrong warning (prism?) https://bugs.ruby-lang.org/issues/20741 * Author: mame (Yusuke Endoh) * Status: Open * Assignee: kddnewton (Kevin Newton) * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ ./local/bin/ruby -we 'p RubyVM::InstructionSequence.compile("42").eval' <compiled>:1: warning: possibly useless use of a literal in void context 42 ``` -- https://bugs.ruby-lang.org/
3 2
0 0
  • ← Newer
  • 1
  • ...
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • ...
  • 22
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.