Why is “❨╯°□°❩╯︵┻━┻” with such an encoding used fo

2020-05-25 00:55发布

I came across following method in sidekiq gem. Its just invoked from test_sidekiq.rb.

def self.❨╯°□°❩╯︵┻━┻
  puts "Calm down, bro"
end

This is the only link I was able to find on SO.

  1. Google can't understand ❨╯°□°❩╯︵┻━┻. Why doesn't Ruby complain about this encoding?
  2. What is the purpose of this method (not much looking at its body)?
  3. Why did author @mike-perham use this name? Just for fun, or testing some boundaries?

标签: ruby sidekiq
3条回答
forever°为你锁心
2楼-- · 2020-05-25 01:25

Looking at the commit that introduced it seems to be some funny sort way to make sure the file is encoded in UTF-8

https://github.com/mperham/sidekiq/commit/c1127165f8157807e7855c60f9849d20fb9fec24

查看更多
\"骚年 ilove
3楼-- · 2020-05-25 01:34

If you really do not understand the sense of the method name, that is a (Japanese-style) facemark. Whereas English facemarks are rotated 90 degrees counter-clockwise and are long in the vertical direction of the actual face, Japanese facemarks are to be read in the direction as is, and are long in the horizontal direction. The author of this is likely to be either a Japanese, or someone who is influenced by Japanese culture like anime.

In this particular case, each character expresses a certain part. From left to right:

  • The right edge of the face
  • The right arm raised
  • ° The right eye
  • The mouth
  • ° The left eye
  • The left edge of the face
  • The left arm raised
  • An imaginary curve expressing the trace of a thrown table
  • ┻━┻ A thrown upside-down table (most likely a chabudai that used to be seen typically in Japanese homes until some decades ago)

Chabudai gaeshi used to happen often at some feudal Japanese homes until some decades ago. The father had the absolute monarchic right at home, and whenever he was frustrated over something, he would flip the chabudai during dinner to show his anger, and the family (especially the mother) had to prepare the dinner again.

chabudai gaeshi

Here are more variations.

查看更多
狗以群分
4楼-- · 2020-05-25 01:36

It's a core part of the Sidekiq API. Sidekiq is limited to only tables while Sidekiq Pro adds APIs to flip other types of furniture: chairs, ottomans, loveseats, etc.

查看更多
登录 后发表回答