>>507625985
>What's the context there?
I think you're talking about sanhedrin 59a2.
It isn't some law that says "kill gentiles if they observe the sabbath."
It's basically a socratic dialogue that starts with
>Rabbi Yohanan says a non-jew who studies the torah is liable for the death penalty since the torah is the inheritance of jews
And then it's mentioned The Gemara disputes that and says
>Actually bros, we need to specifically stone that gentile to death because it's less like he's robbing us and more like he'a cucking us (citing a source verse where the torah is referred to as the betrothed)
And then Rabbi Meir says
>Maybe gentiles studying torah are actually based and not cringe though
And then the argument ends with the idea the inheritance or betrothal of the torah is to mankind in general and not just jews.
https://www.sefaria.org/Sanhedrin.59a.2