简体   繁体   中英

In the Ruby/Rails console what does @@ mean?

In the output for the rails console, what does @@ mean? Example:

@@ -229,12 +229,13 @@

It is unified format diff as Blender mentioned. So @@ -229,12 +229,13 @@ is telling you that when comparing two files, line 229 to line 240 in your first file are different than line 229 to line 241 in your second file.

More details and a sample using unified format at: http://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html

What in the rails console is outputting that? Rails console just outputs the results of whatever code you tell it to execute, it's hard to say what's outputting that without knowing what you are executing. I have never noticed strings like that in rails console before, I don't think it just automatically outputs them or anything.

But that string looks like it might be some kind of diff output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM