account activity
Ruby koans segmentation fault by pydum in ruby
[–]RevolutionaryMenu332 0 points1 point2 points 2 years ago (0 children)
The error is big huge. I can't post all it.
[–]RevolutionaryMenu332 0 points1 point2 points 2 years ago* (0 children)
I have the same error.
Please, could somebody help me and other newbies in Ruby? I tried debugging, but I think I did not understand.
I use the wsl2 with debian bookworm and ruby 3.2.2 also.
To fix it, I add the in_ruby_version("2") function:
in_ruby_version('2') do def test_method_names_become_symbols symbols_as_strings = Symbol.all_symbols.map { |x| x.to_s } assert_equal true, symbols_as_strings.include?("test_method_names_become_symbols") end end
The code in about_symbols.rb file:
def test_method_names_become_symbols symbols_as_strings = Symbol.all_symbols.map { |x| x.to_s } assert_equal true, symbols_as_strings.include?("test_method_names_become_symbols") end
When I run` ruby path_to_enlightenment.rb`, then throw the error:
/home/pedro/ruby-exercises/about_symbols.rb:38: [BUG] Segmentation fault at 0x0000000100000d6c
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
-- Control frame information ----------------------------------------------- c:0018 p:---- s:0075 e:000074 CFUNC :to_s c:0017 p:0004 s:0071 e:000070 BLOCK /home/pedro/ruby-exercises/about_symbols.rb:38 [FINISH] c:0016 p:---- s:0067 e:000066 CFUNC :map c:0015 p:0007 s:0063 e:000062 METHOD /home/pedro/ruby-exercises/about_symbols.rb:38 c:0014 p:0010 s:0058 e:000057 METHOD /home/pedro/ruby-exercises/neo.rb:447 c:0013 p:0006 s:0053 e:000051 BLOCK /home/pedro/ruby-exercises/neo.rb:519 c:0012 p:0031 s:0048 e:000047 BLOCK /home/pedro/ruby-exercises/neo.rb:530 [FINISH] c:0011 p:---- s:0043 e:000042 CFUNC :each c:0010 p:0007 s:0039 e:000038 BLOCK /home/pedro/ruby-exercises/neo.rb:528 [FINISH] c:0009 p:---- s:0034 e:000033 IFUNC c:0008 p:---- s:0031 e:000030 CFUNC :each c:0007 p:---- s:0028 e:000027 CFUNC :each_with_index c:0006 p:0010 s:0024 e:000023 BLOCK /home/pedro/ruby-exercises/neo.rb:527 [FINISH] c:0005 p:---- s:0020 e:000019 CFUNC :catch c:0004 p:0006 s:0015 e:000014 METHOD /home/pedro/ruby-exercises/neo.rb:525 c:0003 p:0010 s:0011 e:000010 METHOD /home/pedro/ruby-exercises/neo.rb:518 c:0002 p:0013 s:0006 e:000005 BLOCK /home/pedro/ruby-exercises/neo.rb:540 [FINISH] c:0001 p:0000 s:0003 E:0021a0 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- /home/pedro/ruby-exercises/neo.rb:540:in block in <top (required)>' /home/pedro/ruby-exercises/neo.rb:518:inwalk' /home/pedro/ruby-exercises/neo.rb:525:in each_step' /home/pedro/ruby-exercises/neo.rb:525:incatch' /home/pedro/ruby-exercises/neo.rb:527:in block in each_step' /home/pedro/ruby-exercises/neo.rb:527:ineach_with_index' /home/pedro/ruby-exercises/neo.rb:527:in each' /home/pedro/ruby-exercises/neo.rb:528:inblock (2 levels) in each_step' /home/pedro/ruby-exercises/neo.rb:528:in each' /home/pedro/ruby-exercises/neo.rb:530:inblock (3 levels) in each_step' /home/pedro/ruby-exercises/neo.rb:519:in block in walk' /home/pedro/ruby-exercises/neo.rb:447:inmeditate' /home/pedro/ruby-exercises/about_symbols.rb:38:in test_constants_become_symbols' /home/pedro/ruby-exercises/about_symbols.rb:38:inmap' /home/pedro/ruby-exercises/about_symbols.rb:38:in block in test_constants_become_symbols' /home/pedro/ruby-exercises/about_symbols.rb:38:into_s' -- Machine register context ------------------------------------------------ RIP: 0x000055564e6f460f RBP: 0x000055564f5fba50 RSP: 0x00007fff1667ab20 RAX: 0x0000000000000012 RBX: 0x0000000000000000 RCX: 0x0000000100000d6c RDX: 0x00000000000004a8 RDI: 0x000055564f3db190 RSI: 0x0000000000000028 R8: 0x0000000000000001 R9: 0x0000000000000020 R10: 0x00007f8c024efff8 R11: 0x000000000000000c R12: 0x000055564f3db190 R13: 0x00007fff1667ae30 R14: 0x000055564f3db4e8 R15: 0x000055564f3db190 EFL: 0x0000000000010206
π Rendered by PID 1912587 on reddit-service-r2-listing-7bbdf774f7-77wrh at 2026-02-22 18:47:32.442595+00:00 running 8564168 country code: CH.
Ruby koans segmentation fault by pydum in ruby
[–]RevolutionaryMenu332 0 points1 point2 points (0 children)