That seems to be the main error but the full error message is
[1mTraceback [m (most recent call last):
4: from playground.rb:42:in `<main>'
3: from playground.rb:42:in `p'
2: from playground.rb:42:in `inspect'
1: from playground.rb:42:in `inspect'
playground.rb:42:in `inspect': [1mcannot set encoding on non-encoding
capable object ( [1;4mArgumentError [m [1m) [m
Thanks for your help in advance.
Maybe it is because I need to combine the previous values of the types
arrays with the additional values and not the previous values are set. What
does the error mean and how to fix it?
`ptl=[[0,3],[1,5],[2],[3,14],[4,0],[5,0],[6,15],[7,9],[8,7],[9,11],[10,16],[11,6],[12],[13,9],[14],[15,14],[16]]
ptl.shuffle()
str=ptl[0]+ptl[1]+ptl[2]
cr=3
i=0
w=Array.new(2) { [] }
until i==3
p ptl[cr]
w[i]=ptl[cr]
if ((w[i]&str).length()==0)
i+=1
end
cr+=1
end
types=Array.new(19) { [[],[],[]] }
pwt=w[0]+w[1]+w[2]
types[17]=[[pwt],[str]]
for i in 0..(pwt.length()-1)
types[pwt[i]]=[[],[19]]
end
for i in 0..(str.length()-1)
types[str[i]]=[[19],[]]
end
typeslist=Array.new(17) {|i| i }
sampstr=Array.new(6) { [] }
sampwk=Array.new(6) { [] }
for i in 0..types.length()-1
typeslist.shuffle()
for j in 0..5
sampstr.push typeslist[j]
end
for j in 6..12
sampwk. push typeslist[j]
end
types[0][i]=sampstr.push types[0][i]
types[1][i]=sampwk.push types[1][i]
types[2][i]=typeslist[13]
end
p types`
Nokogiri v1.16.2 has been released with a security update for CRuby users.
The release notes [1] are reproduced here for your convenience.
[1]: https://github.com/sparklemotion/nokogiri/releases/tag/v1.16.2
---
v1.16.2 / 2024-02-04Security
- [CRuby] Vendored libxml2 is updated to address CVE-2024-25062. See
GHSA-xc9x-jj77-9p9j
<https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xc9x-jj7…>
for
more information.
Dependencies
- [CRuby] Vendored libxml2 is updated to v2.12.5
<https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.5> from
v2.12.4. (@flavorjones <https://github.com/flavorjones>)
------------------------------
sha256 checksums:
69ba15d2a2498324489ed63850997f0b8f684260114ea81116d3082f16551d2d
nokogiri-1.16.2-aarch64-linux.gem
6a05ce42e3587a40cf8936ece0beaa5d32922254215d2e8cf9ad40588bb42e57
nokogiri-1.16.2-arm-linux.gem
c957226c8e36b31be6a3afb8602e2128282bf8b40ea51016c4cd21aa2608d3f8
nokogiri-1.16.2-arm64-darwin.gem
122652bfc338cd8a54a692ac035e245e41fd3b8283299202ca26e7a7d50db310
nokogiri-1.16.2-java.gem
7344b5072ca69fc5bedb61cb01a3b765b93a27aae5a2a845c2ba7200e4345074
nokogiri-1.16.2-x64-mingw-ucrt.gem
a2a5e184a424111a0d5b77947986484920ad708009c667f061e8d02035c562dd
nokogiri-1.16.2-x64-mingw32.gem
833efddeb51a6c2c9f6356295623c2b2e0d50050d468695c59bd929162953323
nokogiri-1.16.2-x86-linux.gem
e67fc0418dffaff9dc8b1dc65f0605282c3fee9488832d0223b620b4319e0b53
nokogiri-1.16.2-x86-mingw32.gem
5def799e5f139f21a79d7cf71172313a7b6fb0e4b2a31ab9bd5d4ad305994539
nokogiri-1.16.2-x86_64-darwin.gem
5b146240ac6ec6c40fd4367623e74442bca45a542bd3282b1d4d18b07b8e5dfe
nokogiri-1.16.2-x86_64-linux.gem
68922ee5cde27497d995c46f2821957bae961947644eed2822d173daf7567f9c
nokogiri-1.16.2.gem
minitest version 5.22.3 has been released!
* home: <https://github.com/minitest/minitest>
* bugs: <https://github.com/minitest/minitest/issues>
* rdoc: <https://docs.seattlerb.org/minitest>
* clog: <https://github.com/minitest/minitest/blob/master/History.rdoc>
* vim: <https://github.com/sunaku/vim-ruby-minitest>
* emacs: <https://github.com/arthurnn/minitest-emacs>
minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking.
"I had a class with Jim Weirich on testing last week and we were
allowed to choose our testing frameworks. Kirk Haines and I were
paired up and we cracked open the code for a few test
frameworks...
I MUST say that minitest is *very* readable / understandable
compared to the 'other two' options we looked at. Nicely done and
thank you for helping us keep our mental sanity."
-- Wayne E. Seguin
minitest/test is a small and incredibly fast unit testing framework.
It provides a rich set of assertions to make your tests clean and
readable.
minitest/spec is a functionally complete spec engine. It hooks onto
minitest/test and seamlessly bridges test assertions over to spec
expectations.
minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner. Now you can assert that your newb
co-worker doesn't replace your linear algorithm with an exponential
one!
minitest/mock by Steven Baker, is a beautifully tiny mock (and stub)
object framework.
minitest/pride shows pride in testing and adds coloring to your test
output. I guess it is an example of how to write IO pipes too. :P
minitest/test is meant to have a clean implementation for language
implementors that need a minimal set of methods to bootstrap a working
test suite. For example, there is no magic involved for test-case
discovery.
"Again, I can't praise enough the idea of a testing/specing
framework that I can actually read in full in one sitting!"
-- Piotr Szotkowski
Comparing to rspec:
rspec is a testing DSL. minitest is ruby.
-- Adam Hawkins, "Bow Before MiniTest"
minitest doesn't reinvent anything that ruby already provides, like:
classes, modules, inheritance, methods. This means you only have to
learn ruby to use minitest and all of your regular OO practices like
extract-method refactorings still apply.
Changes:
### 5.22.3 / 2024-03-13
* 1 minor enhancement:
* MASSIVE improvement of minitest's pride plugin output: Frequencies doubled! Sine waves shifted!! Comments improved!!! Colors rotated!!!! (havenwood)
* 3 bug fixes:
* Improved wording on Minitest::Test#parallelize_me! to clarify it goes INSIDE your test class/describe.
* Minor changes to tests to pass when tests ran with extra flags (eg -p).
* Support Ruby 3.4's new error message format. (mame)
Hey there. Maybe you know, maybe not but there is a fantastic event on
April 26-27, 2024 in Sofia, Bulgaria. So who is coming? I have already
bought a ticket and am planning to have a trip with my car from Turkey; it
would be very fun. See you there.
The talk video and slides have been posted for the Montreal.rb March 2024
talk "Frontend Ruby with Glimmer DSL for Web" (Ruby in the Browser Web
Frontend Framework).
YouTube Video :
https://www.youtube.com/watch?v=rIZ-ILUv9ME&list=PLRAf4zt5oEjc2mqmEN9m_O0Jo…
Google Slides :
https://docs.google.com/presentation/d/e/2PACX-1vQVihtMktOEJ-AJWb1a-uyJfpyn…
Blog Post Announcement :
https://andymaleh.blogspot.com/2024/03/montrealrb-march-2024-frontend-ruby.…
Talk Description :
Rubyists would rather leverage the productivity, readability, and
maintainability benefits of Ruby in Frontend Web Development than
JavaScript to cut down development cost and time by half compared to using
popular yet inferior JavaScript frameworks with bloated JavaScript code as
per Matz's suggestion in his RubyConf 2022 keynote speech to replace
JavaScript with Ruby. Fortunately, this is possible in 2024!
This talk is a continuation of the previous Montreal.rb talk "Intro to Ruby
in the Browser", which ended by promising a new way in the future for
developing Web Frontends that would completely revolutionize the way we
think about and do Frontend Development using Ruby instead of JavaScript.
The future is now!!! The simplest, most intuitive, most straight-forward,
and most productive Frontend Framework in existence is here! It is an
open-source Ruby gem called Glimmer DSL for Web.
Think of Glimmer DSL for Web as the Rails of Frontend Frameworks. With it,
you can finally live in Rubyland in both the Frontend and Backend on the
Web! That opens up the door to ideas like rendering Frontend Components in
the Backend as Server Components in the future, eliminating the conflict
between ERB and JS frontend rendering technologies by leveraging highly
readable, maintainable, and productive Ruby code isomorphically.
This release brings another major step forward in the worry-free installation procedure: binary packages.
wxRuby3 is a cross-platform GUI library for Ruby, based on the mature wxWidgets GUI
toolkit for C++. It uses native widgets wherever possible, providing the correct look,
feel and behavior to GUI applications on Windows, OS X and Linux/GTK. wxRuby aims to
provide a comprehensive solution to developing professional-standard desktop
applications in Ruby.
wxRuby3 also provides extensive and complete reference documentation.
What's changed in this release:
* added support for building and installing binary packages for all major platforms (see the updated documentation);
* added release artifacts for standard binary packages for the latest versions of all supported major platforms;
* added support for Wx::SecretStore and Wx::SecretValue;
* some bugfixes;
* some documentation improvements.
If you are interested check this out:
Documentation: https://mcorino.github.io/wxRuby3/index.html
Github: https://github.com/mcorino/wxruby3
Rubygems: https://rubygems.org/gems/wxruby3