Hello there!
Unfortunately, there are some bad news for you.
Some time ago your device was infected with my private trojan, R.A.T (Remote Administration Tool), if you want to find out more about it simply use Google.
My trojan allowed me to access your files, accounts and your camera.
Check the sender of this email, I have sent it from your email account.
To make sure you read this email, you will receive it multiple times.
You truly enjoy checking out porn websites and watching dirty videos, while having a lot of kinky fun.
I RECORDED YOU (through your camera) SATISFYING YOURSELF!
After that I removed my malware to not leave any traces.
If you still doubt my serious intentions, it only takes couple mouse clicks to share the video of you with your friends, relatives, all email contacts, on social networks, the darknet and to publish all your files.
All you need is $1800 USD in Bitcoin (BTC) transfer to my account.
After the transaction is successful, I will proceed to delete everything.
Be sure, I keep my promises.
You can easily buy Bitcoin (BTC) here:
https://cex.io/buy-bitcoinshttps://nexo.com/buy-crypto/bitcoin-btchttps://bitpay.com/buy-bitcoin/?crypto=BTChttps://paybis.com/https://invity.io/buy-crypto
Or simply google other exchanger.
After that send the Bitcoin (BTC) directly to my wallet, or install the free software: Atomicwallet, or: Exodus wallet, then receive and send to mine.
My Bitcoin (BTC) address is: 13HAreeSVjLf3aueZXf9zmrS1FmvkF4opS
Yes, that's how the address looks like, copy and paste my address, it's (cAsE-sEnSEtiVE).
You are given not more than 3 days after you have opened this email.
As I got access to this email account, I will know if this email has already been read.
Everything will be carried out based on fairness.
An advice from me, regularly change all your passwords to your accounts and update your device with newest security patches.
Issue #5133 has been updated by duerst (Martin Dürst).
In issue #20336, @matheusrich wrote:
```
* [Feature #5133] Array#unzip as an alias of Array#transpose
* Seems a more friendly name for this method (easier if you don't have a strong math background)
* It is nice that we can do an operation an reverse it with two similar-named methods:
```rb
[1, 2, 3, 4].zip(["a", "b", "c", "d"], ["I", "II", "III", "IV"])
# => [[[1, "a"], "I"], [[2, "b"], "II"], [[3, "c"], "III"], [[4, "d"], "IV"]]
[[[1, "a"], "I"], [[2, "b"], "II"], [[3, "c"], "III"], [[4, "d"], "IV"]].unzip
# => [[1, 2, 3, 4], ["a", "b", "c", "d"], ["I", "II", "III", "IV"]]
```
It's already alluded in some of the comments above: `transpose` is it's own inverse, so if we define `unzip` as an alias for `transpose`, `unzip` will be its own inverse.
The reason Haskell has `zip`/`unzip` as inverses is that `zip` in Haskell converts from two lists to a list of pairs, and `unzip` converts from a list of pairs to a pair of lists. In Haskell, `zip` and `unzip` are inverses (up to (un)currying).
In Haskell, the arguments of `zip` are limited to two lists. In Ruby, it's one array as receiver and one or more arrays as arguments. For `transpose`, it's an array of arrays. Only the later is fully generic and thus can be made exactly invertible.
----------------------------------------
Feature #5133: Array#unzip as an alias of Array#transpose
https://bugs.ruby-lang.org/issues/5133#change-107431
* Author: mrkn (Kenta Murata)
* Status: Assigned
* Assignee: mrkn (Kenta Murata)
----------------------------------------
Array#zip の逆は Array#transpose なんですけど、
この対応関係が非常に分かり難いなと思いました。
Haskell には zip の逆をやる関数として unzip が用意されています。
unzip という名前は、「zip の逆をやりたい」と思ったときに
(transpose よりは) 思い付きやすい名前だと思います。
ということで Array#unzip を Array#transpose のエイリアスとして
導入してはどうでしょう?
以下パッチです:
diff --git a/array.c b/array.c
index 8caad66..dc411b7 100644
--- a/array.c
+++ b/array.c
@@ -4720,6 +4720,7 @@ Init_Array(void)
rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);
rb_define_method(rb_cArray, "zip", rb_ary_zip, -1);
rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0);
+ rb_define_alias(rb_cArray, "unzip", "transpose");
rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);
rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
rb_define_method(rb_cArray, "fill", rb_ary_fill, -1);
--
https://bugs.ruby-lang.org/
Issue #20311 has been reported by MaxLap (Maxime Lapointe).
----------------------------------------
Bug #20311: Struct.new("A") memory leak?
https://bugs.ruby-lang.org/issues/20311
* Author: MaxLap (Maxime Lapointe)
* Status: Open
* ruby -v: 3.3.0
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
The following code gives the impression of a memory leak.
```
10.times do
5000.times do
Struct.new("A")
Struct.send(:remove_const, :A)
end
GC.start
puts `ps -o rss= -p #{$$}`.to_i
end
```
```
27868
35324
43400
51472
58676
66144
73764
81196
88512
95752
```
Is there another location where the struct gets set that I need to clear up for the GC free the memory?
Happens in 3.2.2, 3.2.3, 3.3.0, 3.3-head, ruby-head.
--
https://bugs.ruby-lang.org/
Issue #6317 has been updated by matheusrich (Matheus Richard).
@mame @naruse This currently works on Ruby. Can we close this as completed?
----------------------------------------
Feature #6317: Range#cover?の引数としてRangeインスタンスを受けられるようにして欲しい
https://bugs.ruby-lang.org/issues/6317#change-107335
* Author: masaakiaoyagi (Masaaki Aoyagi)
* Status: Assigned
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
青柳と申します。
以下のように、Range#cover?の引数としてRangeインスタンスを
受けられるようにして欲しいです。
(1..4).cover?(2..3) # => true
(1..4).cover?(0..3) # => false
取り敢えず実装してみましたので、添付いたします。
---Files--------------------------------
range_cover.diff (2.17 KB)
--
https://bugs.ruby-lang.org/
Issue #16297 has been updated by jhawthorn (John Hawthorn).
I'm not sure if there's a deeper problem this causes, but it is still possible after this patch to call the allocator on a Rational through defining an arbitrary `allocate` method.
``` ruby
>> def Rational.allocate; end
=> :allocate
>> Class.instance_method(:allocate).bind_call(Rational)
=> (0/1)
```
----------------------------------------
Bug #16297: calling undefined allocator by `Class.instance_method(:allocate)`
https://bugs.ruby-lang.org/issues/16297#change-107083
* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Backport: 2.5: REQUIRED, 2.6: DONE
----------------------------------------
For instance, `Rational.allocate` is undefined.
```ruby
Rational.allocate #=> undefined method `allocate' for Rational:Class (NoMethodError)
```
But it can be called by `Class.instance_method(:allocate)`.
```ruby
Class.instance_method(:allocate).bind_call(Rational) #=> (0/1)
Class.instance_method(:allocate).bind(Rational).call #=> (0/1)
```
These allocators are defined for Marshal, and undefined as methods.
--
https://bugs.ruby-lang.org/
Issue #16142 has been updated by byroot (Jean Boussier).
> So what would be a good name?
What about `position`? I think it goes well together with `location`.
----------------------------------------
Feature #16142: Implement code_range in Proc and Method
https://bugs.ruby-lang.org/issues/16142#change-106130
* Author: okuramasafumi (Masafumi OKURA)
* Status: Open
* Priority: Normal
----------------------------------------
# Abstract
Add a new method `code_range` as an alternative to `source_location` to Proc and Method
# Background
I'd like to get a body from a Proc in TraceLocation gem (https://github.com/yhirano55/trace_location), in order to add what's executed to the output. There's no way to do that in current Ruby implementation, so as an alternative, I considered getting source code location of a Proc.
# Proposal
I propose that `Proc#code_range` and `Method#code_range`. Other names can work as well, for example `Proc#source_region`. It returns an array containing filename as a first argument and position information as a second array. For example:
`a_proc.position # => [(irb), [1, 5, 3, 25]]`
# Implementation
I've implemented a simpler version of this, see gist for more details.
https://gist.github.com/okuramasafumi/ac90bbf04a1c13b7d67954c9c5e62553
Notice I use `code_location` from iseq struct.
# Discussion
One might say that we can simply add columns and end position to Proc#source_location. However, this can easily brake existing apps such as Pry.
It's also possible that we add additional keyword argument to `Proc#source_location`, for instance:
`a_proc.source_location(including_range: true)`
This change can also break existing apps since in old Rubies this keyword argument cannot be accepted.
Therefore, adding a new method is better in terms of backward compatibility. It might be better at readability as well.
# Summary
I propose an API to get code position of Proc and Method so that we can get body of them (especially of a Proc).
--
https://bugs.ruby-lang.org/
Issue #16142 has been updated by okuramasafumi (Masafumi OKURA).
Hi I noticed we didn't get any conclusion on this topic.
I agree that method name should be something different. It follows the Matz's question: "What do we need from the method? line numbers? offset? whatever?
"
https://docs.ruby-lang.org/en/master/IO.html#method-c-read
And we have `IO.read` method that accepts `length` and `offset` parameter. Since it's expected to be used with `IO.read`, it is convenient to return these two values.
And Matz says
> Making the return value as a specific class seems overkill.
And I agree. So the return value could be either Array or Hash. I think Hash is better than Array in this case because the value such as `[19, 10]` doesn't make sense itself.
So what would be a good name? The combination of length and offset doesn't have a specific name as far as I know. What about `location` if `Proc` has this method?
The final version would look like this.
```ruby
my_proc = proc do
do_something
end
loc = my_proc.location
p loc # => {length:10, offset:19} maybe wrong number
p File.read(__FILE__, loc[:length], loc[:offset]) # => do_something
```
----------------------------------------
Feature #16142: Implement code_range in Proc and Method
https://bugs.ruby-lang.org/issues/16142#change-106122
* Author: okuramasafumi (Masafumi OKURA)
* Status: Open
* Priority: Normal
----------------------------------------
# Abstract
Add a new method `code_range` as an alternative to `source_location` to Proc and Method
# Background
I'd like to get a body from a Proc in TraceLocation gem (https://github.com/yhirano55/trace_location), in order to add what's executed to the output. There's no way to do that in current Ruby implementation, so as an alternative, I considered getting source code location of a Proc.
# Proposal
I propose that `Proc#code_range` and `Method#code_range`. Other names can work as well, for example `Proc#source_region`. It returns an array containing filename as a first argument and position information as a second array. For example:
`a_proc.position # => [(irb), [1, 5, 3, 25]]`
# Implementation
I've implemented a simpler version of this, see gist for more details.
https://gist.github.com/okuramasafumi/ac90bbf04a1c13b7d67954c9c5e62553
Notice I use `code_location` from iseq struct.
# Discussion
One might say that we can simply add columns and end position to Proc#source_location. However, this can easily brake existing apps such as Pry.
It's also possible that we add additional keyword argument to `Proc#source_location`, for instance:
`a_proc.source_location(including_range: true)`
This change can also break existing apps since in old Rubies this keyword argument cannot be accepted.
Therefore, adding a new method is better in terms of backward compatibility. It might be better at readability as well.
# Summary
I propose an API to get code position of Proc and Method so that we can get body of them (especially of a Proc).
--
https://bugs.ruby-lang.org/