summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakao Baba <baba@bpsinc.jp>2014-02-05 14:43:20 +0900
committerTakao Baba <baba@bpsinc.jp>2014-02-05 14:43:20 +0900
commit208ec627c323b86824dd5443c507a69e531d20b3 (patch)
treeaf60d1f5e224618d7a25f72c2ec4af335cc6c9f7
parentda34e008c3b67b4d06ecc8a06a102271157f3c13 (diff)
downloadgitlab-ce-208ec627c323b86824dd5443c507a69e531d20b3.tar.gz
Fix 500 error in Ruby 1.9.
-rw-r--r--app/views/shared/_file_hljs.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/_file_hljs.html.haml b/app/views/shared/_file_hljs.html.haml
index 166a13bd76c..338236c0752 100644
--- a/app/views/shared/_file_hljs.html.haml
+++ b/app/views/shared/_file_hljs.html.haml
@@ -1,6 +1,6 @@
%div.highlighted-data{class: user_color_scheme_class}
.line-numbers
- - blob.data.lines.size.times do |index|
+ - blob.data.lines.to_a.size.times do |index|
- offset = defined?(first_line_number) ? first_line_number : 1
- i = index + offset
= link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do