Comments (9)
I thought I would use Array#append
because I planned to use Ruby 2.6 or later in the early development of Sisimai 5, but after many years, I forgot everything and wrote 2.4...
Therefore, I will try to replace Array#append
with Array#push
today.
from rb-sisimai.
JFYI: And Ruby 2.7 already EOL
https://www.ruby-lang.org/ja/downloads/branches/
from rb-sisimai.
JRuby itself supports append
method.
java -jar jruby-complete-9.4.6.0.jar -S irb
irb(main):001:0> a = []
=> []
irb(main):002:0> a.append("a")
=> ["a"]
from rb-sisimai.
@hiroyuki-sato Thank you for checking. However, at least JRuby 9.1 does not have Array#append
as follows:
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 Java HotSpot(TM) 64-Bit Server VM 11.0.5+10-LTS on 11.0.5+10-LTS +jit [darwin-x86_64]
irb(main):001:0> v = []
=> []
irb(main):002:0> v.append("neko")
NoMethodError: undefined method `append' for []:Array
from (irb):2:in `<eval>'
from org/jruby/RubyKernel.java:995:in `eval'
from org/jruby/RubyKernel.java:1316:in `loop'
from org/jruby/RubyKernel.java:1138:in `catch'
from org/jruby/RubyKernel.java:1138:in `catch'
from /usr/local/jr/bin/irb:13:in `<main>'
from rb-sisimai.
JRuby 9.1.x.x is compatible with Ruby 2.3. Array#append
was introduced in MRI 2.5
https://docs.ruby-lang.org/en/3.2/NEWS/NEWS-2_5_0.html
https://bugs.ruby-lang.org/issues/12746
You can use push
instead.
java -jar ~/.embulk/jars/jruby-complete-9.1.15.0.jar -S irb --readline
irb(main):001:0> JRUBY_VERSION
=> "9.1.15.0"
irb(main):002:0> RUBY_VERSION
=> "2.3.3"
irb(main):003:0> a = []
=> []
irb(main):004:0> a.push("a")
=> ["a"]
from rb-sisimai.
@hiroyuki-sato Thank you for the announce of push
method. I've decided that Sisimai 5 requires JRuby 9.2 or later because Sisimai 5 requires Ruby 2.4 or later.
irb(main):004:0> JRUBY_VERSION
=> "9.2.21.0"
irb(main):005:0> RUBY_VERSION
=> "2.5.8"
irb(main):006:0> p=[]; p.append("neko")
=> ["neko"]
from rb-sisimai.
I've decided that Sisimai 5 requires JRuby 9.2 or later because Sisimai 5 requires Ruby 2.4 or later.
Off topic. It seems that append
was introduced in Ruby 2.5. Sisimai supports Ruby 2.4? (Maybe there is no Array#append
method in Ruby 2.4)
from rb-sisimai.
!
from rb-sisimai.
This issue resolved at v5.0.2
from rb-sisimai.
Related Issues (20)
- Analyze didn't work well for multiple lines of encoded text in the subject header. HOT 4
- Release 4.25.16p1 as 4.25.16.1 to RubyGems? HOT 4
- Release 5.0.0 to RubyGems in 29th Feb. HOT 2
- Import/Implement SMTP status codes listed in IANA
- Reason should be "Not Compliant RFC"
- Update SMTP errors and codes in Google (2024/03/02)
- Is anyone running Sisimai on JRuby? HOT 7
- ::Fixnum is deprecated warning on MRI HOT 3
- Cannot run `rake test` with JRuby 9.2 HOT 3
- Could not get the value of "alias" correctly when an email forwarded and bounced HOT 1
- Sisimai.rise(email, delivered: true) returns nil HOT 2
- Follow the SMTP error code updates in Google on Apr 30, 2024 HOT 2
- Test with JRuby 9.4.7.0 HOT 2
- Replace multibyte characters from each code in lib/ directory HOT 1
- Apple opt out email categorized as "vacation" HOT 3
- Array is faster than Hash
- 5.0.2pX on rubygems.org? HOT 2
- Import sisimai/p5-sisimai#523
- Sisimai::Rhost improvement (2024-06)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rb-sisimai.