{"action":"opened","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/2947","labels_url":"https://api.github.com/repos/jruby/jruby/issues/2947/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/2947/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/2947/events","html_url":"https://github.com/jruby/jruby/issues/2947","id":76753010,"number":2947,"title":"[Truffle] Issue with zsuper calls and option arguments","user":{"login":"nirvdrum","id":12584,"avatar_url":"https://avatars.githubusercontent.com/u/12584?v=3","gravatar_id":"","url":"https://api.github.com/users/nirvdrum","html_url":"https://github.com/nirvdrum","followers_url":"https://api.github.com/users/nirvdrum/followers","following_url":"https://api.github.com/users/nirvdrum/following{/other_user}","gists_url":"https://api.github.com/users/nirvdrum/gists{/gist_id}","starred_url":"https://api.github.com/users/nirvdrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirvdrum/subscriptions","organizations_url":"https://api.github.com/users/nirvdrum/orgs","repos_url":"https://api.github.com/users/nirvdrum/repos","events_url":"https://api.github.com/users/nirvdrum/events{/privacy}","received_events_url":"https://api.github.com/users/nirvdrum/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jruby/jruby/labels/truffle","name":"truffle","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-15T15:00:39Z","updated_at":"2015-05-15T15:00:39Z","closed_at":null,"body":"Truffle currently will not pass the default values for optional arguments up to `super` calls.  E.g.,\r\n\r\n```\r\nclass A\r\n  def m(x, y, z)\r\n    p \"A#m(#{x}, #{y}, #{z})\"\r\n  end\r\nend\r\n\r\nclass B < A\r\n  def m(x, y, z = nil)\r\n    super\r\n    p \"B#m(#{x}, #{y}, #{z})\"\r\n  end\r\nend\r\n\r\nB.new.m(5, 4, 3)\r\nB.new.m(5, 4)\r\n```\r\n\r\nRunning in MRI we get:\r\n\r\n```\r\n> ruby -v zsuper.rb \r\nruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]\r\nA#m(5, 4, 3)\r\nB#m(5, 4, 3)\r\nA#m(5, 4, )\r\nB#m(5, 4, )\r\n```\r\n\r\nIn JRuby+Truffle, we get:\r\n\r\n```\r\n> bin/jruby -X+T -v zsuper.rb \r\njruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-05-14 5ed91b4 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]\r\nA#m(5, 4, 3)\r\nB#m(5, 4, 3)\r\nzsuper.rb:2:in `m': wrong number of arguments (2 for 3) (ArgumentError)\r\n\tfrom zsuper.rb:9:in `m'\r\n\tfrom zsuper.rb:15:in `<main>'\r\n```"}}